opendev(3) takes a const char *, just what getinfo() provides.

I see no point in casting away the const;  no amd64 object change.
OK?

Index: vnconfig.c
===================================================================
RCS file: /cvs/src/sbin/vnconfig/vnconfig.c,v
retrieving revision 1.8
diff -u -p -r1.8 vnconfig.c
--- vnconfig.c  16 Aug 2022 16:18:16 -0000      1.8
+++ vnconfig.c  19 Aug 2022 18:33:44 -0000
@@ -234,7 +234,7 @@ getinfo(const char *vname, int *availp)
                print_all = 1;
        }
 
-       vd = opendev((char *)vname, O_RDONLY, OPENDEV_PART, NULL);
+       vd = opendev(vname, O_RDONLY, OPENDEV_PART, NULL);
        if (vd == -1)
                err(1, "open: %s", vname);
 

Reply via email to