diff options
| author | Bryce Harrington <bryce@osg.samsung.com> | 2016-07-08 19:00:20 -0700 |
|---|---|---|
| committer | Bryce Harrington <bryce@osg.samsung.com> | 2016-07-11 13:32:15 -0700 |
| commit | 1cda73f3f85514ef18f180d350e1e390ff388f10 (patch) | |
| tree | c1e2ee5c2f50a51cdbb6fb64b00846f56f2a8bb8 | |
| parent | scanner: Move PROGRAM_NAME define (diff) | |
| download | wayland-1cda73f3f85514ef18f180d350e1e390ff388f10.tar wayland-1cda73f3f85514ef18f180d350e1e390ff388f10.tar.gz wayland-1cda73f3f85514ef18f180d350e1e390ff388f10.tar.bz2 wayland-1cda73f3f85514ef18f180d350e1e390ff388f10.tar.lz wayland-1cda73f3f85514ef18f180d350e1e390ff388f10.tar.xz wayland-1cda73f3f85514ef18f180d350e1e390ff388f10.tar.zst wayland-1cda73f3f85514ef18f180d350e1e390ff388f10.zip | |
tests: Require base 10 for the string specifying the number of open fd's
The third arg to strtol() specifies the base to assume for the number.
When 0 is passed, as is currently done in wayland-client.c, hexadecimal
and octal numbers are permitted and automatically detected and
converted.
exec-fd-leak-checker's single argument is the count of file descriptors
it should expect to be open. We should expect this to be specified only
as a decimal number, there's no reason why one would want to use octal
or hexadecimal for that.
Suggested by Yong Bakos.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
| -rw-r--r-- | tests/exec-fd-leak-checker.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/exec-fd-leak-checker.c b/tests/exec-fd-leak-checker.c index 0c69da3..5f3b395 100644 --- a/tests/exec-fd-leak-checker.c +++ b/tests/exec-fd-leak-checker.c @@ -37,7 +37,7 @@ parse_count(const char *str, int *value) long v; errno = 0; - v = strtol(str, &end, 0); + v = strtol(str, &end, 10); if ((errno == ERANGE && (v == LONG_MAX || v == LONG_MIN)) || (errno != 0 && v == 0) || (end == str) || |
