builtin/notes: simplify early exit code in add()
commitb0de56c6a5bb41da71babafefc9207b0fc211d66
authorJohan Herland <johan@herland.net>
Wed, 12 Nov 2014 00:40:12 +0000 (12 01:40 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Nov 2014 18:58:09 +0000 (12 10:58 -0800)
treeefe53a71152b5399a6a662c5e30b6bda21daf9b9
parent4282af0fc91e7a2667f8cba7282a5b70347f6e6f
builtin/notes: simplify early exit code in add()

Remove the need for 'retval' and the unnecessary goto. Also reorganize
to only call free_note_data() is actually needed.

Improved-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/notes.c