From: Jaakko Heinonen Date: Fri, 5 Dec 2003 18:11:55 +0000 (+0000) Subject: minor tweaks X-Git-Tag: upstream/0.6.1~2^2~225 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=67d7885c6f6e11e16488cac7117c503e03248183;p=pkg%2Fabook.git minor tweaks --- diff --git a/options.c b/options.c index 9724103..41bde1b 100644 --- a/options.c +++ b/options.c @@ -257,6 +257,8 @@ opt_set_set_option(char *var, char *p, struct option *opt) else return "invalid value"; break; + default: + assert(0); } return NULL; @@ -293,16 +295,14 @@ opt_parse_customfield(buffer *b) size_t len; find_token_start(b); - p = b -> ptr; - find_token_end(b); memset(num, 0, sizeof(num)); len = (b -> ptr - p); strncpy(num, p, min(sizeof(num) - 1, len)); - n = atoi(num); + n = safe_atoi(num); find_token_start(b);