summaryrefslogtreecommitdiff
path: root/peek-remote.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-02-20 09:54:00 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-02-21 06:03:15 (GMT)
commit599065a3bb94ae9f48e3808b8fafc8443017af28 (patch)
tree077a948312df0b4a1c969d251fb5fc69124bbe30 /peek-remote.c
parentcc44c7655fe2dd0cfb46e841156634fe622df397 (diff)
downloadgit-599065a3bb94ae9f48e3808b8fafc8443017af28.zip
git-599065a3bb94ae9f48e3808b8fafc8443017af28.tar.gz
git-599065a3bb94ae9f48e3808b8fafc8443017af28.tar.bz2
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/peek-remote.c b/peek-remote.c
index 7b66228..96bfac4 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;
}