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

Peter Krempa posted 1 patch 5 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/74fad50de4afaf28330266a8f7320b82042736af.1525706069.git.pkrempa@redhat.com
Test syntax-check passed
src/util/virfile.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[libvirt] [PATCH] util: file: Fix usage of STRPREFIX in virFileIsCDROM
Posted by Peter Krempa 5 years, 11 months ago
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>
---
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@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list