]> git.deb.at Git - pkg/abook.git/commitdiff
minor tweaks
authorJaakko Heinonen <jheinonen@users.sourceforge.net>
Fri, 5 Dec 2003 18:11:55 +0000 (18:11 +0000)
committerJaakko Heinonen <jheinonen@users.sourceforge.net>
Fri, 5 Dec 2003 18:11:55 +0000 (18:11 +0000)
options.c

index 9724103818794cc5db1075b025a5c56850347e24..41bde1b920644eb332b4c2d48548403003b8a5dc 100644 (file)
--- 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);