projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* patch #3966: Create a mh_xmalloc function to prevent mistakes when
[mmh]
/
sbr
/
fmt_addr.c
diff --git
a/sbr/fmt_addr.c
b/sbr/fmt_addr.c
index
2e4bff6
..
97f4271
100644
(file)
--- a/
sbr/fmt_addr.c
+++ b/
sbr/fmt_addr.c
@@
-12,6
+12,7
@@
#include <h/mh.h>
#include <h/addrsbr.h>
#include <h/fmt_scan.h>
#include <h/mh.h>
#include <h/addrsbr.h>
#include <h/fmt_scan.h>
+#include <h/utils.h>
static char *buf; /* our current working buffer */
static char *bufend; /* end of working buffer */
static char *buf; /* our current working buffer */
static char *bufend; /* end of working buffer */
@@
-63,9
+64,7
@@
formataddr (char *orig, char *str)
/* if we don't have a buffer yet, get one */
if (bufsiz == 0) {
/* if we don't have a buffer yet, get one */
if (bufsiz == 0) {
- buf = malloc (BUFINCR);
- if (! buf)
- adios (NULL, "formataddr: couldn't allocate buffer space");
+ buf = mh_xmalloc (BUFINCR);
last_dst = buf; /* XXX */
bufsiz = BUFINCR - 6; /* leave some slop */
bufend = buf + bufsiz;
last_dst = buf; /* XXX */
bufsiz = BUFINCR - 6; /* leave some slop */
bufend = buf + bufsiz;