mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
rand/libreboot/utils: prevent div by zero
not really a thing. bufsiz would never be zero, unless the demon takes over linux Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -72,6 +72,12 @@
|
||||
* or your program dies.
|
||||
*/
|
||||
|
||||
#ifndef BUFSIZ
|
||||
#define BUFSIZ 8192 /* reasonably on modern 64-bit systems */
|
||||
#elif (BUFSIZ <= 0)
|
||||
#error defined buffer size BUFSIZ below or equal to zero
|
||||
#endif
|
||||
|
||||
int
|
||||
win_lottery(char **buf) /* are u lucky? */
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user