* 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
@ -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>
|
Thu Oct 17 05:17:33 2013 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* ext/objspace/object_tracing.c: add new method
|
* 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;
|
struct bug_reporters *reporter;
|
||||||
if (bug_reporters_size >= MAX_BUG_REPORTERS) {
|
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 = &bug_reporters[bug_reporters_size++];
|
||||||
reporter->func = func;
|
reporter->func = func;
|
||||||
reporter->data = data;
|
reporter->data = data;
|
||||||
|
|
||||||
return bug_reporters_size;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user