diff options
author | Junio C Hamano <junkio@cox.net> | 2007-02-20 12:54:00 +0300 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-02-21 09:03:15 +0300 |
commit | 599065a3bb94ae9f48e3808b8fafc8443017af28 (patch) | |
tree | 077a948312df0b4a1c969d251fb5fc69124bbe30 /peek-remote.c | |
parent | cc44c7655fe2dd0cfb46e841156634fe622df397 (diff) |
prefixcmp(): fix-up mechanical conversion.
Previous step converted use of strncmp() with literal string
mechanically even when the result is only used as a boolean:
if (!strncmp("foo", arg, 3)) ==> if (!(-prefixcmp(arg, "foo")))
This step manually cleans them up to read:
if (!prefixcmp(arg, "foo"))
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'peek-remote.c')
-rw-r--r-- | peek-remote.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/peek-remote.c b/peek-remote.c index 7b66228a22..96bfac498b 100644 --- a/peek-remote.c +++ b/peek-remote.c @@ -35,11 +35,11 @@ int main(int argc, char **argv) char *arg = argv[i]; if (*arg == '-') { - if (!(-prefixcmp(arg, "--upload-pack="))) { + if (!prefixcmp(arg, "--upload-pack=")) { uploadpack = arg + 14; continue; } - if (!(-prefixcmp(arg, "--exec="))) { + if (!prefixcmp(arg, "--exec=")) { uploadpack = arg + 7; continue; } |