projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add() first parameter (s2) is now const
[mmh]
/
sbr
/
fmt_addr.c
diff --git
a/sbr/fmt_addr.c
b/sbr/fmt_addr.c
index
d6218b5
..
25c0e16
100644
(file)
--- a/
sbr/fmt_addr.c
+++ b/
sbr/fmt_addr.c
@@
-41,7
+41,7
@@
static unsigned int bufsiz; /* current size of buf */
** returns a pointer to the concatenated address string.
**
** We try to not do a lot of malloc/copy/free's (which is why we
** returns a pointer to the concatenated address string.
**
** We try to not do a lot of malloc/copy/free's (which is why we
-** don't call "getcpy") but still place no upper limit on the
+** don't call "mh_xstrdup") but still place no upper limit on the
** length of the result string.
**
** This routine is placed in a separate library so it can be
** length of the result string.
**
** This routine is placed in a separate library so it can be
@@
-51,16
+51,16
@@
static unsigned int bufsiz; /* current size of buf */
char *
formataddr(char *orig, char *str)
{
char *
formataddr(char *orig, char *str)
{
- register int len;
- register int isgroup;
- register char *dst;
- register char *cp;
- register char *sp;
- register struct mailname *mp = NULL;
+ int len;
+ int isgroup;
+ char *dst;
+ char *cp;
+ char *sp;
+ struct mailname *mp = NULL;
/* 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 = mh_xmalloc(BUFINCR);
+ buf = mh_xcalloc(BUFINCR, sizeof(char));
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;