Avoid strerror() when possible and just rely on warning/error
to handle errno in the proper locale.
This commit is contained in:
@@ -685,8 +685,10 @@ set_cmnd(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (strlen(user_cmnd) >= PATH_MAX)
|
||||
errorx(1, _("%s: %s"), user_cmnd, strerror(ENAMETOOLONG));
|
||||
if (strlen(user_cmnd) >= PATH_MAX) {
|
||||
errno = ENAMETOOLONG;
|
||||
error(1, "%s", user_cmnd);
|
||||
}
|
||||
|
||||
if ((user_base = strrchr(user_cmnd, '/')) != NULL)
|
||||
user_base++;
|
||||
|
Reference in New Issue
Block a user