summaryrefslogtreecommitdiff
path: root/connected.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-08-13 15:55:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-08-13 18:05:26 (GMT)
commit3e19816dc044a4aca4a15276c92f804c44d0f65f (patch)
tree02c667fb56c1c192fe70451bcf873089f4234364 /connected.c
parentd5e1961c19a2b638a700d03729cbb6c27fe5a3e8 (diff)
downloadgit-3e19816dc044a4aca4a15276c92f804c44d0f65f.zip
git-3e19816dc044a4aca4a15276c92f804c44d0f65f.tar.gz
git-3e19816dc044a4aca4a15276c92f804c44d0f65f.tar.bz2
ls-remote: simplify UNLEAK() usage
We UNLEAK() the "sorting" list created by parsing command-line options (which is essentially used until the program exits). But we do so right before leaving the cmd_ls_remote() function, which means we have to hit all of the exits. But the point of UNLEAK() is that it's an annotation which doesn't impact the variable itself. We can mark it as soon as we're done writing its value, and then we only have to do so once. This gives us a minor code reduction, and serves as a better example of how UNLEAK() can be used. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'connected.c')
0 files changed, 0 insertions, 0 deletions