This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:
Subject: libv4lconvert: use strtoul instead of strtol where appropriate Author: Hans Verkuil <[email protected]> Date: Fri Sep 26 10:23:55 2025 +0200 In several cases environment variables were parsed using strtol, even though the value can never be negative. Change it to strtoul. Signed-off-by: Hans Verkuil <[email protected]> lib/libv4lconvert/control/libv4lcontrol-priv.h | 4 ++-- lib/libv4lconvert/control/libv4lcontrol.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) --- http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=022b1bc73ccce9bc69b55f43febfad0f862184e2 diff --git a/lib/libv4lconvert/control/libv4lcontrol-priv.h b/lib/libv4lconvert/control/libv4lcontrol-priv.h index 5268b7cad750..db6f2f94fd3b 100644 --- a/lib/libv4lconvert/control/libv4lcontrol-priv.h +++ b/lib/libv4lconvert/control/libv4lcontrol-priv.h @@ -34,9 +34,9 @@ struct v4lcontrol_flags_info; struct v4lcontrol_data { int fd; /* Device fd */ int bandwidth; /* Connection bandwidth (0 = unknown) */ - int flags; /* Flags for this device */ + unsigned int flags; /* Flags for this device */ int priv_flags; /* Internal use only flags */ - int controls; /* Which controls to use for this device */ + unsigned int controls; /* Which controls to use for this device */ unsigned int *shm_values; /* shared memory control value store */ unsigned int old_values[V4LCONTROL_COUNT]; /* for controls_changed() */ const struct v4lcontrol_flags_info *flags_info; diff --git a/lib/libv4lconvert/control/libv4lcontrol.c b/lib/libv4lconvert/control/libv4lcontrol.c index 676719372bb7..318738b09b11 100644 --- a/lib/libv4lconvert/control/libv4lcontrol.c +++ b/lib/libv4lconvert/control/libv4lcontrol.c @@ -629,7 +629,7 @@ struct v4lcontrol_data *v4lcontrol_create(int fd, void *dev_ops_priv, /* Allow overriding through environment */ s = getenv("LIBV4LCONTROL_FLAGS"); if (s) - data->flags = strtol(s, NULL, 0); + data->flags = strtoul(s, NULL, 0); ctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL; if (data->dev_ops->ioctl(data->dev_ops_priv, data->fd, @@ -681,7 +681,7 @@ struct v4lcontrol_data *v4lcontrol_create(int fd, void *dev_ops_priv, /* Allow overriding through environment */ s = getenv("LIBV4LCONTROL_CONTROLS"); if (s) - data->controls = strtol(s, NULL, 0); + data->controls = strtoul(s, NULL, 0); if (data->controls == 0) return data; /* No need to create a shared memory segment */
