util/nvmutil: better SSIZE_MAX define

the old one assumes that ssize_t is signed size_t,
which let's face it, is always true in practise,
but not actually guaranteed!

so now i'm using one that's even more pedantic.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-10 13:42:43 +00:00
parent 79106c5b3d
commit 06cb129530
+1 -5
View File
@@ -285,12 +285,8 @@ static const char *mac_str;
static const char *fname;
static const char *argv0;
#ifndef SIZE_MAX
#define SIZE_MAX ((size_t)-1)
#endif
#ifndef SSIZE_MAX
#define SSIZE_MAX ((ssize_t)(SIZE_MAX >> 1))
#define SSIZE_MAX ((ssize_t)(~((size_t)1 << (sizeof(ssize_t)*CHAR_BIT-1))))
#endif
/*