From 82246b765bdfc191aa809cf3dd672de18ad6352a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Fri, 20 Dec 2013 17:53:52 +0700 Subject: [PATCH] daemon: be strict at parsing parameters --[no-]informative-errors MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Use strcmp() instead of starts_with()/!prefixcmp() to stop accepting --informative-errors-just-a-little Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- daemon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon.c b/daemon.c index 34916c5e10..13608c07c6 100644 --- a/daemon.c +++ b/daemon.c @@ -1278,11 +1278,11 @@ int main(int argc, char **argv) make_service_overridable(arg + 18, 0); continue; } - if (!prefixcmp(arg, "--informative-errors")) { + if (!strcmp(arg, "--informative-errors")) { informative_errors = 1; continue; } - if (!prefixcmp(arg, "--no-informative-errors")) { + if (!strcmp(arg, "--no-informative-errors")) { informative_errors = 0; continue; } -- 2.11.4.GIT