mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
never let bufferevent_rlim functions return negative
This commit is contained in:
parent
142500317e
commit
085987093f
@ -245,6 +245,8 @@ _bufferevent_get_rlim_max(struct bufferevent_private *bev, int is_write)
|
||||
CLAMPTO(share);
|
||||
}
|
||||
|
||||
if (max_so_far < 0)
|
||||
max_so_far = 0;
|
||||
return max_so_far;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user