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: capture-example.c: use strtoul instead of strtol for -c Author: Hans Verkuil <[email protected]> Date: Fri Sep 26 10:26:48 2025 +0200 The --count command line argument was parsed using strtol, even though the argument can never be negative. Change it to strtoul. Signed-off-by: Hans Verkuil <[email protected]> contrib/test/capture-example.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=c433a9ba168199915583720fd4f9d61b578d96c7 diff --git a/contrib/test/capture-example.c b/contrib/test/capture-example.c index 421cb61f694b..723165dc0c56 100644 --- a/contrib/test/capture-example.c +++ b/contrib/test/capture-example.c @@ -45,7 +45,7 @@ struct buffer *buffers; static unsigned int n_buffers; static int out_buf; static int force_format; -static int frame_count = 70; +static unsigned int frame_count = 70; static void errno_exit(const char *s) { @@ -557,7 +557,7 @@ static void usage(FILE *fp, int argc, char **argv) "-u | --userp Use application allocated buffers\n" "-o | --output Outputs stream to stdout\n" "-f | --format Force format to 640x480 YUYV\n" - "-c | --count Number of frames to grab [%i]\n" + "-c | --count Number of frames to grab [%u]\n" "", argv[0], dev_name, frame_count); } @@ -625,7 +625,7 @@ int main(int argc, char **argv) case 'c': errno = 0; - frame_count = strtol(optarg, NULL, 0); + frame_count = strtoul(optarg, NULL, 0); if (errno) errno_exit(optarg); break;
