summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/printf/int.c
diff options
context:
space:
mode:
authorkettenis <>2020-07-14 16:40:04 +0000
committerkettenis <>2020-07-14 16:40:04 +0000
commit4f1ef9d80a0607a37ef931241c14ed2da153094f (patch)
treea62dbebcde803508785290dd6d444aa5a2367de1 /src/regress/lib/libc/printf/int.c
parent8d01f37b978865bbd6c1afedc83a5a2e091342ab (diff)
downloadopenbsd-4f1ef9d80a0607a37ef931241c14ed2da153094f.tar.gz
openbsd-4f1ef9d80a0607a37ef931241c14ed2da153094f.tar.bz2
openbsd-4f1ef9d80a0607a37ef931241c14ed2da153094f.zip
getopt(3) returns an int so don't use a char to store its return value.
Makes the test work on architectures where char is unsigned. ok deraadt@, millert@
Diffstat (limited to 'src/regress/lib/libc/printf/int.c')
-rw-r--r--src/regress/lib/libc/printf/int.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/regress/lib/libc/printf/int.c b/src/regress/lib/libc/printf/int.c
index d6ecb7a98d..5a56c8d50e 100644
--- a/src/regress/lib/libc/printf/int.c
+++ b/src/regress/lib/libc/printf/int.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: int.c,v 1.1 2020/07/09 01:49:15 schwarze Exp $ */ 1/* $OpenBSD: int.c,v 1.2 2020/07/14 16:40:04 kettenis Exp $ */
2/* 2/*
3 * Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org> 3 * Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org>
4 * 4 *
@@ -178,7 +178,7 @@ int
178main(int argc, char *argv[]) 178main(int argc, char *argv[])
179{ 179{
180 int badarg, picky; 180 int badarg, picky;
181 char ch; 181 int ch;
182 182
183 badarg = picky = 0; 183 badarg = picky = 0;
184 while ((ch = getopt(argc, argv, "pv")) != -1) { 184 while ((ch = getopt(argc, argv, "pv")) != -1) {