diff options
author | sterlingjensen <[email protected]> | 2020-12-17 12:19:30 -0600 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-17 10:19:30 -0800 |
commit | fb188409f1b60390e3c8e4bbb18f887be44887e1 (patch) | |
tree | c18154fade3f94533d0db79c14451c3bc9dd8fc4 /cmd | |
parent | be5c6d96530e19efde7c0af771f9ddb0073ef751 (diff) |
Use the correct return type for getopt
Use the correct return type for getopt otherwise clang complains
about tautological-constant-out-of-range-compare.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Sterling Jensen <[email protected]>
Closes #11359
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/zfs/zfs_main.c | 2 | ||||
-rw-r--r-- | cmd/zfs_ids_to_path/zfs_ids_to_path.c | 2 | ||||
-rw-r--r-- | cmd/zpool/zpool_main.c | 2 | ||||
-rw-r--r-- | cmd/zstream/zstream_redup.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 8064f6363..ab2b006ae 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -8492,7 +8492,7 @@ zfs_do_wait(int argc, char **argv) { boolean_t enabled[ZFS_WAIT_NUM_ACTIVITIES]; int error, i; - char c; + int c; /* By default, wait for all types of activity. */ for (i = 0; i < ZFS_WAIT_NUM_ACTIVITIES; i++) diff --git a/cmd/zfs_ids_to_path/zfs_ids_to_path.c b/cmd/zfs_ids_to_path/zfs_ids_to_path.c index 6cfaa6f41..80dd5bf2d 100644 --- a/cmd/zfs_ids_to_path/zfs_ids_to_path.c +++ b/cmd/zfs_ids_to_path/zfs_ids_to_path.c @@ -44,7 +44,7 @@ int main(int argc, char **argv) { boolean_t verbose = B_FALSE; - char c; + int c; while ((c = getopt(argc, argv, "v")) != -1) { switch (c) { case 'v': diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index c84f30ccb..e00fdb7ae 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -10147,7 +10147,7 @@ int zpool_do_wait(int argc, char **argv) { boolean_t verbose = B_FALSE; - char c; + int c; char *value; int i; unsigned long count; diff --git a/cmd/zstream/zstream_redup.c b/cmd/zstream/zstream_redup.c index 379025ce5..41f1068e3 100644 --- a/cmd/zstream/zstream_redup.c +++ b/cmd/zstream/zstream_redup.c @@ -421,7 +421,7 @@ int zstream_do_redup(int argc, char *argv[]) { boolean_t verbose = B_FALSE; - char c; + int c; while ((c = getopt(argc, argv, "v")) != -1) { switch (c) { |