]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
util: remove redundant cast in argconfig_parse_type()
authorCaleb Sander Mateos <csander@purestorage.com>
Tue, 16 Jul 2024 16:13:01 +0000 (10:13 -0600)
committerDaniel Wagner <wagi@monom.org>
Wed, 17 Jul 2024 14:57:45 +0000 (16:57 +0200)
s->default_value is already a void *,
so there is no need to cast it to a char * and back.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
util/argconfig.c

index 87487eae7156ca1fcc9e8904da3954f2d5465cbe..4bb0ea9286fd40e4f7ce6ed8c31168e199d93cbd 100644 (file)
@@ -145,7 +145,7 @@ static int argconfig_error(char *type, const char *opt, const char *arg)
 static int argconfig_parse_type(struct argconfig_commandline_options *s, struct option *option,
                                int index)
 {
-       void *value = (void *)(char *)s->default_value;
+       void *value = s->default_value;
        char *endptr;
        int ret = 0;