diff options
author | Jeff King <peff@peff.net> | 2019-10-02 11:32:07 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-03 09:58:25 +0900 |
commit | 53d687bf5f8008abd52b92120c7e22d4d81bdc71 (patch) | |
tree | a4d9ff6c1e026ce15b5e1aab9c13b1911624bdd4 /t/t4034/python | |
parent | wrapper: use a loop instead of repetitive statements (diff) | |
download | tgif-53d687bf5f8008abd52b92120c7e22d4d81bdc71.tar.xz |
git_mkstemps_mode(): replace magic numbers with computed value
The magic number "6" appears several times in the function, and is
related to the size of the "XXXXXX" string we expect to find in the
template. Let's pull that "XXXXXX" into a constant array, whose size we
can get at compile time with ARRAY_SIZE().
Note that we probably can't just change this value, since callers will
be feeding us a certain number of X's, but it hopefully makes the
function itself easier to follow.
While we're here, let's do the same with the "letters" array (which we
_could_ modify if we wanted to include more characters).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4034/python')
0 files changed, 0 insertions, 0 deletions