Fix off-by-one error in complaint_internal

complaint_internal had an off-by-one error, where it would allow one
extra complaint to be issued.

gdb/ChangeLog
2018-10-04  Tom Tromey  <tom@tromey.com>

	* complaints.c (complaint_internal): Correctly check complaint
	count.
This commit is contained in:
Tom Tromey 2018-05-27 21:36:44 -06:00
parent 3f2cf4dcd5
commit 9fdd7193e7
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2018-10-04 Tom Tromey <tom@tromey.com>
* complaints.c (complaint_internal): Correctly check complaint
count.
2018-10-04 Tom Tromey <tom@tromey.com>
* complaints.h (struct complaints): Remove declaration.

View File

@ -56,7 +56,7 @@ complaint_internal (const char *fmt, ...)
{
va_list args;
if (counters[fmt]++ > stop_whining)
if (++counters[fmt] > stop_whining)
return;
va_start (args, fmt);