--- embedaddon/iftop/stringmap.c 2012/02/21 16:57:34 1.1.1.1 +++ embedaddon/iftop/stringmap.c 2016/10/18 14:04:50 1.1.1.2 @@ -8,7 +8,7 @@ * */ -static const char rcsid[] = "$Id: stringmap.c,v 1.1.1.1 2012/02/21 16:57:34 misho Exp $"; +static const char rcsid[] = "$Id: stringmap.c,v 1.1.1.2 2016/10/18 14:04:50 misho Exp $"; #include @@ -53,11 +53,11 @@ void stringmap_delete_free(stringmap S) { } /* stringmap_insert: - * Insert into S an item having key k and value d. Returns an existing key - * or NULL if it was inserted. + * Insert into S an item having key k and value d. Returns a pointer to + * the existing item value, or NULL if a new item was created. */ item *stringmap_insert(stringmap S, const char *k, const item d) { - if (!S) return 0; + if (!S) return NULL; if (S->key == NULL) { S->key = xstrdup(k); S->d = d;