libkvm: Remove not needed casts in vsnprintf() calls.
authorzrj <rimvydas.jasinskas@gmail.com>
Sat, 6 Apr 2019 17:56:47 +0000 (20:56 +0300)
committerzrj <zrj@dragonflybsd.org>
Sun, 7 Apr 2019 19:19:42 +0000 (22:19 +0300)
Caught by -Wcast-qual.

lib/libkvm/kvm.c

index eee4d00..67bc8f6 100644 (file)
@@ -95,7 +95,7 @@ _kvm_err(kvm_t *kd, const char *program, const char *fmt, ...)
                (void)fputc('\n', stderr);
        } else
                (void)vsnprintf(kd->errbuf,
-                   sizeof(kd->errbuf), (char *)fmt, ap);
+                   sizeof(kd->errbuf), fmt, ap);
 
        va_end(ap);
 }
@@ -114,7 +114,7 @@ _kvm_syserr(kvm_t *kd, const char *program, const char *fmt, ...)
        } else {
                char *cp = kd->errbuf;
 
-               (void)vsnprintf(cp, sizeof(kd->errbuf), (char *)fmt, ap);
+               (void)vsnprintf(cp, sizeof(kd->errbuf), fmt, ap);
                n = strlen(cp);
                (void)snprintf(&cp[n], sizeof(kd->errbuf) - n, ": %s",
                    strerror(errno));