Skip to content

Commit

Permalink
banned.h: fix vsprintf()'s ban message
Browse files Browse the repository at this point in the history
In cc8fdae (banned.h: mark sprintf() as banned, 2018-07-24), both
'sprintf()' and 'vsprintf()' were marked as banned functions. The
non-variadic macro to ban 'vsprintf' has a typo which says that
'sprintf', not 'vsprintf' is banned. The variadic version does not have
the same typo.

Fix this by updating the explicit form of 'vsprintf' as the banned
version of itself, not 'sprintf'.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
ttaylorr authored and gitster committed Aug 26, 2019
1 parent 75b2f01 commit 60d198d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion banned.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define vsprintf(...) BANNED(vsprintf)
#else
#define sprintf(buf,fmt,arg) BANNED(sprintf)
#define vsprintf(buf,fmt,arg) BANNED(sprintf)
#define vsprintf(buf,fmt,arg) BANNED(vsprintf)
#endif

#endif /* BANNED_H */

0 comments on commit 60d198d

Please sign in to comment.