summary refs log tree commit diff
path: root/Src/Modules
diff options
context:
space:
mode:
authorSebastian Gniazdowski <psprint2@fastmail.com>2017-02-06 15:46:11 -0800
committerPeter Stephenson <pws@zsh.org>2017-02-07 09:48:59 +0000
commit3be8e1bbdde909f7432e1223bf3b4ee3c6470402 (patch)
treef439c4610812ad50c2e6504ec86752e272d08fb8 /Src/Modules
parentec1bdab023543a60b2cd6f920c38bd88a4057886 (diff)
downloadzsh-3be8e1bbdde909f7432e1223bf3b4ee3c6470402.tar.gz
zsh-3be8e1bbdde909f7432e1223bf3b4ee3c6470402.tar.xz
zsh-3be8e1bbdde909f7432e1223bf3b4ee3c6470402.zip
40507: Remove extraneous null creating GDBM records
Diffstat (limited to 'Src/Modules')
-rw-r--r--Src/Modules/db_gdbm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Src/Modules/db_gdbm.c b/Src/Modules/db_gdbm.c
index 8dd60fc0d..310e32948 100644
--- a/Src/Modules/db_gdbm.c
+++ b/Src/Modules/db_gdbm.c
@@ -170,7 +170,7 @@ gdbmgetfn(Param pm)
     GDBM_FILE dbf;
 
     key.dptr = pm->node.nam;
-    key.dsize = strlen(key.dptr) + 1;
+    key.dsize = strlen(key.dptr);
 
     dbf = (GDBM_FILE)(pm->u.hash->tmpdata);
     ret = gdbm_exists(dbf, key);
@@ -191,9 +191,9 @@ gdbmsetfn(Param pm, char *val)
     GDBM_FILE dbf;
 
     key.dptr = pm->node.nam;
-    key.dsize = strlen(key.dptr) + 1;
+    key.dsize = strlen(key.dptr);
     content.dptr = val;
-    content.dsize = strlen(content.dptr) + 1;
+    content.dsize = strlen(content.dptr);
 
     dbf = (GDBM_FILE)(pm->u.hash->tmpdata);
     (void)gdbm_store(dbf, key, content, GDBM_REPLACE);
@@ -207,7 +207,7 @@ gdbmunsetfn(Param pm, UNUSED(int um))
     GDBM_FILE dbf;
 
     key.dptr = pm->node.nam;
-    key.dsize = strlen(key.dptr) + 1;
+    key.dsize = strlen(key.dptr);
 
     dbf = (GDBM_FILE)(pm->u.hash->tmpdata);
     (void)gdbm_delete(dbf, key);
@@ -302,12 +302,12 @@ gdbmhashsetfn(Param pm, HashTable ht)
 	    v.pm = (Param) hn;
 
 	    key.dptr = v.pm->node.nam;
-	    key.dsize = strlen(key.dptr) + 1;
+	    key.dsize = strlen(key.dptr);
 
 	    queue_signals();
 
 	    content.dptr = getstrvalue(&v);
-	    content.dsize = strlen(content.dptr) + 1;
+	    content.dsize = strlen(content.dptr);
 
 	    (void)gdbm_store(dbf, key, content, GDBM_REPLACE);