diff options
Diffstat (limited to 'src/qmail-newu.c')
-rw-r--r-- | src/qmail-newu.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/qmail-newu.c b/src/qmail-newu.c index f2e33cd..ee836bb 100644 --- a/src/qmail-newu.c +++ b/src/qmail-newu.c @@ -17,36 +17,41 @@ #define WHO "qmail-newu" -int rename(const char *, const char *); // stdio.h - void die_chdir() { logmsg(WHO, 110, ERROR, "unable to chdir"); } + void die_nomem() { logmsg(WHO, 111, FATAL, "fatal: out of memory"); } + void die_opena() { logmsg(WHO, 112, ERROR, "unable to open users/assign"); } + void die_reada() { logmsg(WHO, 110, ERROR, "unable to read users/assign"); } + void die_format() { logmsg(WHO, 112, ERROR, "bad format in users/assign"); } + void die_opent() { logmsg(WHO, 112, ERROR, "unable to open users/assign.cdb.tmp"); } + void die_writet() { logmsg(WHO, 112, ERROR, "unable to write users/assign.cdb.tmp"); } + void die_rename() { logmsg(WHO, 112, ERROR, "unable to move users/cdb.tmp to users/assign.cdb"); @@ -112,11 +117,12 @@ int main() if (!stralloc_copyb(&data, line.s + i + 1, line.len - i - 1)) die_nomem(); numcolons = 0; - for (i = 0; i < data.len; ++i) + for (i = 0; i < data.len; ++i) { if (data.s[i] == ':') { data.s[i] = 0; if (++numcolons == 6) break; } + } if (numcolons < 6) die_format(); data.len = i; |