]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: Remove NONNULL(1) for virBitmapParseUnlimited
authorJohn Ferlan <jferlan@redhat.com>
Tue, 21 Mar 2017 17:51:11 +0000 (13:51 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 22 Mar 2017 17:49:59 +0000 (13:49 -0400)
The code checks and handles a NULL 'str', so just remove the NONNULL.

Update the error message to add the NULLSTR() around 'str' also.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/util/virbitmap.c
src/util/virbitmap.h

index d263d73cad54a892e8cdaf0952964c0faff7dc0b..eac63d9974cb2e877f5def7f30f55f35f7ae11c1 100644 (file)
@@ -647,7 +647,7 @@ virBitmapParseUnlimited(const char *str)
 
  error:
     virReportError(VIR_ERR_INVALID_ARG,
-                   _("Failed to parse bitmap '%s'"), str);
+                   _("Failed to parse bitmap '%s'"), NULLSTR(str));
     virBitmapFree(bitmap);
     return NULL;
 }
index 3ba40aed65a1ecf6491bcd0680acb94f4b773cfe..36282af1cddf2aa340ee3c134e7d7cc938ba73ac 100644 (file)
@@ -95,8 +95,7 @@ virBitmapParseSeparator(const char *str,
                         virBitmapPtr *bitmap,
                         size_t bitmapSize);
 virBitmapPtr
-virBitmapParseUnlimited(const char *str)
-    ATTRIBUTE_NONNULL(1);
+virBitmapParseUnlimited(const char *str);
 
 virBitmapPtr virBitmapNewCopy(virBitmapPtr src) ATTRIBUTE_NONNULL(1);