Browse Source

assert without if

doc_update_sequoia
Krista Grothoff 6 years ago
parent
commit
7454aac08a
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      src/stringpair.c

+ 5
- 1
src/stringpair.c View File

@ -11,8 +11,12 @@ DYNAMIC_API stringpair_t * new_stringpair(const char *key, const char *value)
stringpair_t *pair = NULL;
assert(key);
assert(value),
assert(value);
if (!key || !value) {
return NULL;
}
pair = calloc(1, sizeof(stringpair_t));
assert(pair);
if (pair == NULL)


Loading…
Cancel
Save