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

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

 



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

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
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

--
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