projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* patch #3968: Move the add() function from its own file (add.c) and
[mmh]
/
uip
/
popi.c
diff --git
a/uip/popi.c
b/uip/popi.c
index
953db14
..
ef11a4a
100644
(file)
--- a/
uip/popi.c
+++ b/
uip/popi.c
@@
-13,6
+13,7
@@
#include <h/fmt_scan.h>
#include <h/scansbr.h>
#include <h/mts.h>
#include <h/fmt_scan.h>
#include <h/scansbr.h>
#include <h/mts.h>
+#include <h/utils.h>
#include <errno.h>
#ifndef RPOP
#include <errno.h>
#ifndef RPOP
@@
-214,7
+215,7
@@
main (int argc, char **argv)
}
snprintf (mailname, sizeof(mailname), "PO box for %s@%s", user, host);
}
snprintf (mailname, sizeof(mailname), "PO box for %s@%s", user, host);
- if (pop_init (host, user, pass, snoop, rpop) == NOTOK)
+ if (pop_init (host, user, pass, NULL, snoop, rpop) == NOTOK)
adios (NULL, "%s", response);
if (rpop > 0)
setuid (getuid ());
adios (NULL, "%s", response);
if (rpop > 0)
setuid (getuid ());
@@
-402,8
+403,7
@@
popi (void)
if (*dp == '\\' || *dp == '"' || *dp == '\n')
i++;
i++;
if (*dp == '\\' || *dp == '"' || *dp == '\n')
i++;
i++;
- if ((ep = malloc ((unsigned) i)) == NULL)
- adios (NULL, "out of memory");
+ ep = mh_xmalloc ((unsigned) i);
for (dp = nfs, fp = ep; *dp; dp++) {
if (*dp == '\n') {
*fp++ = '\\', *fp++ = 'n';
for (dp = nfs, fp = ep; *dp; dp++) {
if (*dp == '\n') {
*fp++ = '\\', *fp++ = 'n';