X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=fish%2Fedit.c;h=3fc41fb1c34d7c0c42fa42ecaaf8255ce7eb18a5;hp=1b6ce23cac165acf49e25f9c7e58c9d9da6c5d61;hb=89486c50eaeb8b1cc5a6ff388cb47e859f8565d1;hpb=c17ff8145718ed86419a7f6c5000b73dd54e324a diff --git a/fish/edit.c b/fish/edit.c index 1b6ce23..3fc41fb 100644 --- a/fish/edit.c +++ b/fish/edit.c @@ -88,9 +88,9 @@ do_edit (const char *cmd, int argc, char *argv[]) } /* Choose an editor. */ - if (strcasecmp (cmd, "vi") == 0) + if (STRCASEEQ (cmd, "vi")) editor = "vi"; - else if (strcasecmp (cmd, "emacs") == 0) + else if (STRCASEEQ (cmd, "emacs")) editor = "emacs -nw"; else { editor = getenv ("EDITOR"); @@ -149,7 +149,7 @@ do_edit (const char *cmd, int argc, char *argv[]) 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;