mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 16:04:15 +01:00
bandb/bandb: functions that call exit(3) should be marked noreturn, avoid sign overflow in integer function argument
This commit is contained in:
parent
85e31de32c
commit
1e75ec9c7d
1 changed files with 7 additions and 1 deletions
|
@ -236,6 +236,9 @@ parse_request(rb_helper *helper)
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
error_cb(rb_helper *helper) __attribute__((noreturn));
|
||||
|
||||
static void
|
||||
error_cb(rb_helper *helper)
|
||||
{
|
||||
|
@ -282,13 +285,16 @@ setup_signals(void)
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
db_error_cb(const char *errstr) __attribute__((noreturn));
|
||||
|
||||
static void
|
||||
db_error_cb(const char *errstr)
|
||||
{
|
||||
char buf[256];
|
||||
snprintf(buf, sizeof(buf), "! :%s", errstr);
|
||||
rb_helper_write(bandb_helper, "%s", buf);
|
||||
rb_sleep(2 << 30, 0);
|
||||
rb_sleep(1 << 30, 0);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue