summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: daee733)
raw | patch | inline | side by side (parent: daee733)
author | Sebastian Harl <sh@tokkee.org> | |
Sat, 17 Aug 2013 20:09:10 +0000 (22:09 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sat, 17 Aug 2013 20:09:10 +0000 (22:09 +0200) |
src/core/store.c | patch | blob | history |
diff --git a/src/core/store.c b/src/core/store.c
index dba88cd2a03a70e126bf0b409e9d68b6b85e6b25..eebe24b0ed48b7db014bc64dca3dd4c42fce1620 100644 (file)
--- a/src/core/store.c
+++ b/src/core/store.c
return ret;
value = va_arg(ap, const char *);
- SDB_ATTR(obj)->value = strdup(value);
- if (! SDB_ATTR(obj)->value)
- return -1;
+ if (value) {
+ SDB_ATTR(obj)->value = strdup(value);
+ if (! SDB_ATTR(obj)->value)
+ return -1;
+ }
return 0;
} /* sdb_attr_init */