diff options
author | gshapiro <gshapiro@FreeBSD.org> | 2001-05-28 17:10:35 +0000 |
---|---|---|
committer | gshapiro <gshapiro@FreeBSD.org> | 2001-05-28 17:10:35 +0000 |
commit | fe77e70108d5e4da42ec6ee7e4f1bfaccd64ef04 (patch) | |
tree | 94f6971eb38134bbccc202099b9cf11ca0d5b908 /contrib/sendmail/praliases | |
parent | 175e3eb50e42986bc6de77adab1f3e58878b2a88 (diff) | |
download | FreeBSD-src-fe77e70108d5e4da42ec6ee7e4f1bfaccd64ef04.zip FreeBSD-src-fe77e70108d5e4da42ec6ee7e4f1bfaccd64ef04.tar.gz |
Resolve conflicts from 8.11.4 import
Diffstat (limited to 'contrib/sendmail/praliases')
-rw-r--r-- | contrib/sendmail/praliases/praliases.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/contrib/sendmail/praliases/praliases.c b/contrib/sendmail/praliases/praliases.c index b4d4414..47ac4e5 100644 --- a/contrib/sendmail/praliases/praliases.c +++ b/contrib/sendmail/praliases/praliases.c @@ -21,7 +21,7 @@ static char copyright[] = #endif /* ! lint */ #ifndef lint -static char id[] = "@(#)$Id: praliases.c,v 8.59.4.18 2001/01/22 19:00:18 gshapiro Exp $"; +static char id[] = "@(#)$Id: praliases.c,v 8.59.4.19 2001/02/28 02:37:57 ca Exp $"; #endif /* ! lint */ /* $FreeBSD$ */ @@ -359,12 +359,20 @@ praliases(filename, argc, argv) } else for (; *argv != NULL; ++argv) { + int get_res; + memset(&db_key, '\0', sizeof db_key); memset(&db_value, '\0', sizeof db_value); db_key.data = *argv; - db_key.size = strlen(*argv) + 1; - if (database->smdb_get(database, &db_key, - &db_value, 0) == SMDBE_OK) + db_key.size = strlen(*argv); + get_res = database->smdb_get(database, &db_key, &db_value, 0); + if (get_res == SMDBE_NOT_FOUND) + { + db_key.size++; + get_res = database->smdb_get(database, &db_key, + &db_value, 0); + } + if (get_res == SMDBE_OK) { printf("%.*s:%.*s\n", (int) db_key.size, |