diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-07-09 11:33:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-07-09 11:33:28 -0700 |
commit | e91ae32a01ffe294b8510c1d8cd7138493a0712f (patch) | |
tree | 461b9dacf6c1e8adf5f59251af093dc7c407091f /credential-cache--daemon.c | |
parent | 72c779457cd72928e36f2bc43c3ff7f3ae7b77c3 (diff) | |
parent | 67a31f612830e79fe768ac886ed9ef7eadd8fb10 (diff) | |
download | git-e91ae32a01ffe294b8510c1d8cd7138493a0712f.tar.gz |
Merge branch 'jk/skip-prefix'
* jk/skip-prefix:
http-push: refactor parsing of remote object names
imap-send: use skip_prefix instead of using magic numbers
use skip_prefix to avoid repeated calculations
git: avoid magic number with skip_prefix
fetch-pack: refactor parsing in get_ack
fast-import: refactor parsing of spaces
stat_opt: check extra strlen call
daemon: use skip_prefix to avoid magic numbers
fast-import: use skip_prefix for parsing input
use skip_prefix to avoid repeating strings
use skip_prefix to avoid magic numbers
transport-helper: avoid reading past end-of-string
fast-import: fix read of uninitialized argv memory
apply: use skip_prefix instead of raw addition
refactor skip_prefix to return a boolean
avoid using skip_prefix as a boolean
daemon: mark some strings as const
parse_diff_color_slot: drop ofs parameter
Diffstat (limited to 'credential-cache--daemon.c')
-rw-r--r-- | credential-cache--daemon.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/credential-cache--daemon.c b/credential-cache--daemon.c index 390f194252..3b370ca5e5 100644 --- a/credential-cache--daemon.c +++ b/credential-cache--daemon.c @@ -109,14 +109,12 @@ static int read_request(FILE *fh, struct credential *c, const char *p; strbuf_getline(&item, fh, '\n'); - p = skip_prefix(item.buf, "action="); - if (!p) + if (!skip_prefix(item.buf, "action=", &p)) return error("client sent bogus action line: %s", item.buf); strbuf_addstr(action, p); strbuf_getline(&item, fh, '\n'); - p = skip_prefix(item.buf, "timeout="); - if (!p) + if (!skip_prefix(item.buf, "timeout=", &p)) return error("client sent bogus timeout line: %s", item.buf); *timeout = atoi(p); |