]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
blkpr: store return value of getopt_long in int
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 11 Oct 2023 05:20:43 +0000 (07:20 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Wed, 11 Oct 2023 05:20:43 +0000 (07:20 +0200)
getopt_long returns an int. Don't try to store it in a char.

See #2538.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
sys-utils/blkpr.c

index e9b50ccd6443f748bbacd8127ce6a31dd0e244f4..90763db402ccebca5ec0b423fd38e8ceddfb5e77 100644 (file)
@@ -242,7 +242,7 @@ static void __attribute__((__noreturn__)) usage(void)
 
 int main(int argc, char **argv)
 {
-       char c;
+       int c;
        char *path;
        uint64_t key = 0, oldkey = 0;
        int command = -1, type = -1, flag = 0;