[PATCH 10/22] util: Remove NONNULL(1) for virBitmapParseUnlimited

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/util/virbitmap.c | 2 +-
 src/util/virbitmap.h | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c
index d263d73..eac63d9 100644
--- a/src/util/virbitmap.c
+++ b/src/util/virbitmap.c
@@ -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;
 }
diff --git a/src/util/virbitmap.h b/src/util/virbitmap.h
index 3ba40ae..36282af 100644
--- a/src/util/virbitmap.h
+++ b/src/util/virbitmap.h
@@ -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);
 
-- 
2.9.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux