mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-30 22:05:46 +00:00
Add ssizeof macro that returns ssize_t.
We can use this instead of casting the result of size_t to int. Also change checks for snprintf() returning <=0 to <0.
This commit is contained in:
@@ -88,7 +88,7 @@ sudo_stat_plugin(struct plugin_info *info, char *fullpath,
|
||||
|
||||
len = snprintf(fullpath, pathsize, "%s%s", sudo_conf_plugin_dir_path(),
|
||||
info->path);
|
||||
if (len <= 0 || (size_t)len >= pathsize) {
|
||||
if (len < 0 || (size_t)len >= pathsize) {
|
||||
sudo_warnx(U_("error in %s, line %d while loading plugin \"%s\""),
|
||||
_PATH_SUDO_CONF, info->lineno, info->symbol_name);
|
||||
sudo_warnx(U_("%s%s: %s"), sudo_conf_plugin_dir_path(), info->path,
|
||||
|
Reference in New Issue
Block a user