diff options
-rw-r--r-- | lib/hashtable.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hashtable.c b/lib/hashtable.c index ffaa5b6e4b..1c48692b69 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -622,7 +622,7 @@ ssize_t hexport_r(struct hsearch_data *htab, const char sep, int flag, list[n++] = ep; - totlen += strlen(ep->key) + 2; + totlen += strlen(ep->key); if (sep == '\0') { totlen += strlen(ep->data); @@ -662,7 +662,7 @@ ssize_t hexport_r(struct hsearch_data *htab, const char sep, int flag, return (-1); } } else { - size = totlen + 1; + size = totlen; } /* Check if the user provided a buffer */ |