]> git.ipfire.org Git - thirdparty/git.git/commit - gpg-interface.c
verify_signed_buffer: drop pbuf variable
authorJeff King <peff@peff.net>
Fri, 17 Jun 2016 23:38:39 +0000 (19:38 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sat, 18 Jun 2016 00:03:56 +0000 (17:03 -0700)
commitc752fcc8e0df02c6b1bd4daec1d08f0f2bcca58a
tree0a0ac84dda11ce94bfdec9d4d66c35d5c458259b
parentaedb5dc343be58c17dc974be401f6d2a9fa26d1e
verify_signed_buffer: drop pbuf variable

If our caller gave us a non-NULL gpg_status parameter, we
write the gpg status into their strbuf. If they didn't, then
we write it to a temporary local strbuf (since we still need
to look at it).  The variable "pbuf" adds an extra layer of
indirection so that the rest of the function can just access
whichever is appropriate.

However, the name "pbuf" isn't very descriptive, and it's
easy to get confused about what is supposed to be in it
(especially because we are reading both "status" and
"output" from gpg).

Rather than give it a more descriptive name, we can just use
gpg_status as our indirection pointer. Either it points to
the caller's input, or we can point it directly to our
temporary buffer.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gpg-interface.c