git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change strncmp() == 0 to STREQLEN()
[libguestfs.git]
/
fish
/
destpaths.c
diff --git
a/fish/destpaths.c
b/fish/destpaths.c
index
275db49
..
9a3da82
100644
(file)
--- a/
fish/destpaths.c
+++ b/
fish/destpaths.c
@@
-18,8
+18,6
@@
#include <config.h>
#include <config.h>
-#define _GNU_SOURCE // for strndup, asprintf
-
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
@@
-135,7
+133,7
@@
complete_dest_paths_generator (const char *text, int state)
} while (0)
/* Is it a device? */
} while (0)
/* Is it a device? */
- if (len < 5 ||
strncmp (text, "/dev/", 5) == 0
) {
+ if (len < 5 ||
STREQLEN (text, "/dev/", 5)
) {
/* Get a list of everything that can possibly begin with /dev/ */
strs = guestfs_list_devices (g);
APPEND_STRS_AND_FREE;
/* Get a list of everything that can possibly begin with /dev/ */
strs = guestfs_list_devices (g);
APPEND_STRS_AND_FREE;