]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: file: Fix usage of STRPREFIX in virFileIsCDROM
authorPeter Krempa <pkrempa@redhat.com>
Mon, 7 May 2018 15:12:26 +0000 (17:12 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 7 May 2018 15:12:26 +0000 (17:12 +0200)
STRPREFIX takes only two arguments, but the code it was adapted from
used function with 3 arguments.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
src/util/virfile.c

index ea2a3ea7312a71c885647a27c572ed93d7fd7451..523241f64fd2610e179a53bf94317f473afb67b7 100644 (file)
@@ -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;