git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "perl: Rerun configure if MAX_PROC_NR changes."
[libguestfs.git]
/
fish
/
edit.c
diff --git
a/fish/edit.c
b/fish/edit.c
index
1b6ce23
..
a010057
100644
(file)
--- a/
fish/edit.c
+++ b/
fish/edit.c
@@
-88,9
+88,9
@@
do_edit (const char *cmd, int argc, char *argv[])
}
/* Choose an editor. */
}
/* Choose an editor. */
- if (
strcasecmp (cmd, "vi") == 0
)
+ if (
STRCASEEQ (cmd, "vi")
)
editor = "vi";
editor = "vi";
- else if (
strcasecmp (cmd, "emacs") == 0
)
+ else if (
STRCASEEQ (cmd, "emacs")
)
editor = "emacs -nw";
else {
editor = getenv ("EDITOR");
editor = "emacs -nw";
else {
editor = getenv ("EDITOR");
@@
-149,14
+149,14
@@
do_edit (const char *cmd, int argc, char *argv[])
unlink (filename);
/* Changed? */
unlink (filename);
/* Changed? */
- if (strlen (content) == size &&
strncmp (content, content_new, size) == 0
) {
+ if (strlen (content) == size &&
STREQLEN (content, content_new, size)
) {
free (content);
free (content_new);
return 0;
}
/* Write new content. */
free (content);
free (content_new);
return 0;
}
/* Write new content. */
- if (guestfs_write
_file
(g, argv[0], content_new, size) == -1) {
+ if (guestfs_write (g, argv[0], content_new, size) == -1) {
free (content);
free (content_new);
return -1;
free (content);
free (content_new);
return -1;