mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* error.c (rb_bug_reporter_add): return simply 0 if failed.
Please check return value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7726089eaa
commit
f9718bf703
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Oct 17 05:31:31 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* error.c (rb_bug_reporter_add): return simply 0 if failed.
|
||||
Please check return value.
|
||||
|
||||
Thu Oct 17 05:17:33 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* ext/objspace/object_tracing.c: add new method
|
||||
|
|
4
error.c
4
error.c
|
@ -278,13 +278,13 @@ rb_bug_reporter_add(void (*func)(FILE *, void *), void *data)
|
|||
{
|
||||
struct bug_reporters *reporter;
|
||||
if (bug_reporters_size >= MAX_BUG_REPORTERS) {
|
||||
rb_bug("rb_bug_reporter_add: overflow");
|
||||
return 0; /* failed to register */
|
||||
}
|
||||
reporter = &bug_reporters[bug_reporters_size++];
|
||||
reporter->func = func;
|
||||
reporter->data = data;
|
||||
|
||||
return bug_reporters_size;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Reference in a new issue