projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
port -file switch to pick
[mmh]
/
sbr
/
seq_list.c
diff --git
a/sbr/seq_list.c
b/sbr/seq_list.c
index
f051e38
..
3606f6f
100644
(file)
--- a/
sbr/seq_list.c
+++ b/
sbr/seq_list.c
@@
-27,7
+27,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;
- buffer = mh_xmalloc((size_t) len);
+ buffer = mh_xcalloc(len, sizeof(char));
}
/*
}
/*
@@
-72,7
+72,7
@@
seq_list(struct msgs *mp, char *seqname)
char *newbuf;
len += MAXBUFFER;
char *newbuf;
len += MAXBUFFER;
- newbuf = mh_xrealloc(buffer, (size_t) len);
+ newbuf = mh_xrealloc(buffer, len);
bp = newbuf + (bp - buffer);
buffer = newbuf;
}
bp = newbuf + (bp - buffer);
buffer = newbuf;
}
@@
-91,8
+91,8
@@
seq_list(struct msgs *mp, char *seqname)
/*
** Scan to the end of this message range
*/
/*
** Scan to the end of this message range
*/
- for (++i; i <= mp->hghmsg && does_exist(mp, i) && in_sequence(mp, seqnum, i);
- ++i)
+ for (++i; i <= mp->hghmsg && does_exist(mp, i) &&
+ in_sequence(mp, seqnum, i); ++i)
;
if (i - j > 1) {
;
if (i - j > 1) {