mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-20 05:36:23 +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.
|
* 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
|
int
|
||||||
win_lottery(char **buf) /* are u lucky? */
|
win_lottery(char **buf) /* are u lucky? */
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user