cleanup
authorVolker Birk <vb@pep.foundation>
Tue, 16 Jan 2018 12:43:08 +0100
changeset 2393d40873a44181
parent 2392 c97a7f143f6d
child 2395 2b7294a57041
child 2400 424f37a81a6b
cleanup
src/bloblist.c
     1.1 --- a/src/bloblist.c	Tue Jan 16 09:15:58 2018 +0100
     1.2 +++ b/src/bloblist.c	Tue Jan 16 12:43:08 2018 +0100
     1.3 @@ -128,15 +128,15 @@
     1.4          const char *mime_type, const char *filename)
     1.5  {
     1.6      assert(blob);
     1.7 -    if (blob == NULL)
     1.8 +    if (!blob)
     1.9          return NULL;
    1.10  
    1.11 -    if (bloblist == NULL)
    1.12 +    if (!bloblist)
    1.13          return new_bloblist(blob, size, mime_type, filename);
    1.14  
    1.15 -    if (bloblist->value == NULL) { // empty list
    1.16 -        assert(bloblist->next);
    1.17 -        if (bloblist->next != NULL)
    1.18 +    if (!bloblist->value) { // empty list
    1.19 +        assert(!bloblist->next);
    1.20 +        if (bloblist->next)
    1.21              return NULL; // invalid list
    1.22              
    1.23          if (!set_blob_data(bloblist, blob, size, mime_type, filename)) {
    1.24 @@ -157,7 +157,7 @@
    1.25      list_curr->release_value = release_value;
    1.26  
    1.27      assert(list_curr->next);
    1.28 -    if (list_curr->next == NULL)
    1.29 +    if (!list_curr->next)
    1.30          return NULL;
    1.31  
    1.32      return list_curr->next;