projects
/
idzebra-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49b1fde
)
Fix 0 ptr reference in zsets.c ZEB-661
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 17 Apr 2014 18:40:14 +0000
(20:40 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 17 Apr 2014 18:40:14 +0000
(20:40 +0200)
rset/rset.c
patch
|
blob
|
history
diff --git
a/rset/rset.c
b/rset/rset.c
index
f653a21
..
f64ff45
100644
(file)
--- a/
rset/rset.c
+++ b/
rset/rset.c
@@
-343,13
+343,11
@@
TERMID rset_term_create(const char *name, int length, const char *flags,
zint hits_limit, const char *ref_id)
{
- TERMID t;
- yaz_log (log_level, "term_create '%s' %d f=%s type=%d nmem=%p",
- name, length, flags, type, nmem);
- t= (TERMID) nmem_malloc(nmem, sizeof(*t));
+ TERMID t = (TERMID) nmem_malloc(nmem, sizeof(*t));
+
if (!name)
- t->name = NULL;
- else if (length == -1)
+ name = "";
+ if (length == -1)
t->name = nmem_strdup(nmem, name);
else
t->name = nmem_strdupn(nmem, name, length);