diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 19:03:11 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 19:03:11 +0200 |
commit | 20b85c03e751b4876fa3c92040464e483172b746 (patch) | |
tree | 734fadbfdbc143ec4465093857f4c239448715e0 /src/qmail-newu.c | |
parent | a6a7d6ce079cabdaf2fa502b2e2cf15e5428ac6f (diff) |
manual format adjustment
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; |