mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 13:04:23 -04: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);
|
CLAMPTO(share);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (max_so_far < 0)
|
||||||
|
max_so_far = 0;
|
||||||
return max_so_far;
|
return max_so_far;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user