Code

core: Allow objects to have the same size as sdb_object_t.
authorSebastian Harl <sh@tokkee.org>
Thu, 10 Apr 2014 15:57:44 +0000 (17:57 +0200)
committerSebastian Harl <sh@tokkee.org>
Thu, 10 Apr 2014 15:57:44 +0000 (17:57 +0200)
That is, allow minimalistic objects which only have a name.

src/core/object.c

index 177ac4c3ada9a76009805187d0a0cd4eda322b9e..9101918654379a1ff41491df64187d399468d186 100644 (file)
@@ -82,7 +82,7 @@ sdb_object_vcreate(const char *name, sdb_type_t type, va_list ap)
 {
        sdb_object_t *obj;
 
-       if (type.size <= sizeof(sdb_object_t))
+       if (type.size < sizeof(sdb_object_t))
                return NULL;
 
        obj = malloc(type.size);