From f93a40ecb6bd5bc6ebfcd9c6bd3c9c4cb5e519ab Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Tue, 3 Mar 2026 21:50:10 +0000 Subject: util/nvmutil: rename errval to nvm_errval strtonum implementations in bsd sometimes have this variable name. rename it to avoid conflict. also removed the commentt errno values, since i'm only ever setting it to valid values, as are the syscalls that i'm using, so it should be ok. i'm not writing a stub to check errno. that would be far beyond the scope of nvmutil. Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 10cb1f45..65743fe6 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -630,7 +630,7 @@ err_if(int x) } static void -err(int errval, const char *msg, ...) +err(int nvm_errval, const char *msg, ...) { va_list args; @@ -640,7 +640,7 @@ err(int errval, const char *msg, ...) vfprintf(stderr, msg, args); va_end(args); - set_err(errval); + set_err(nvm_errval); fprintf(stderr, ": %s", strerror(errno)); fprintf(stderr, "\n"); @@ -667,7 +667,7 @@ set_err(int x) if (errno) return; if (x) - errno = x; /* TODO: check x against system errno values */ + errno = x; else errno = ECANCELED; } -- cgit v1.2.1