projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
uip/folder.c: chdir(nmhdir) in main rather than in dodir, which
[mmh]
/
sbr
/
seq_list.c
diff --git
a/sbr/seq_list.c
b/sbr/seq_list.c
index
8a44069
..
f5dbb65
100644
(file)
--- a/
sbr/seq_list.c
+++ b/
sbr/seq_list.c
@@
-11,6
+11,7
@@
*/
#include <h/mh.h>
*/
#include <h/mh.h>
+#include <h/utils.h>
/* allocate this much buffer space at a time */
#define MAXBUFFER 1024
/* allocate this much buffer space at a time */
#define MAXBUFFER 1024
@@
-29,8
+30,7
@@
seq_list(struct msgs *mp, char *seqname)
/* On first invocation, allocate initial buffer space */
if (!buffer) {
len = MAXBUFFER;
/* On first invocation, allocate initial buffer space */
if (!buffer) {
len = MAXBUFFER;
- if (!(buffer = malloc ((size_t) len)))
- adios (NULL, "unable to malloc storage in seq_list");
+ buffer = mh_xmalloc ((size_t) len);
}
/*
}
/*
@@
-75,8
+75,7
@@
seq_list(struct msgs *mp, char *seqname)
char *newbuf;
len += MAXBUFFER;
char *newbuf;
len += MAXBUFFER;
- if (!(newbuf = realloc (buffer, (size_t) len)))
- adios (NULL, "unable to realloc storage in seq_list");
+ newbuf = mh_xrealloc (buffer, (size_t) len);
bp = newbuf + (bp - buffer);
buffer = newbuf;
}
bp = newbuf + (bp - buffer);
buffer = newbuf;
}