[libvirt] [PATCH] util: file: Fix usage of STRPREFIX in virFileIsCDROM

Peter Krempa pkrempa at redhat.com
Mon May 7 15:14:54 UTC 2018


STRPREFIX takes only two arguments, but the code it was adapted from
used function with 3 arguments.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
Pushed under the build-breaker rule.t

 src/util/virfile.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/virfile.c b/src/util/virfile.c
index ea2a3ea731..523241f64f 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -1982,8 +1982,8 @@ virFileIsCDROM(const char *path)
 int
 virFileIsCDROM(const char *path)
 {
-    if (STRPREFIX(path, "/dev/cd", NULL) ||
-        STRPREFIX(path, "/dev/acd", NULL))
+    if (STRPREFIX(path, "/dev/cd") ||
+        STRPREFIX(path, "/dev/acd"))
         return 1;

     return 0;
-- 
2.16.2




More information about the libvir-list mailing list