summaryrefslogtreecommitdiff
path: root/compat/terminal.h
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2015-09-24 17:08:14 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-10-05 11:08:05 -0700
commitb26cb7c777f8fcca5ec26cc6a7f9eba85378104f (patch)
tree383f961c9a425f0adc42ea5317484172664821e3 /compat/terminal.h
parentavoid sprintf and strcpy with flex arrays (diff)
downloadtgif-b26cb7c777f8fcca5ec26cc6a7f9eba85378104f.tar.xz
receive-pack: simplify keep_arg computation
To generate "--keep=receive-pack $pid on $host", we write progressively into a single buffer, which requires keeping track of how much we've written so far. But since the result is destined to go into our argv array, we can simply use argv_array_pushf. Unfortunately we still have to have a fixed-size buffer for the gethostname() call, but at least it now doesn't involve any extra size computation. And as a bonus, we drop an sprintf and a strcpy call. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/terminal.h')
0 files changed, 0 insertions, 0 deletions