libkvm: Silence -Wmissing-field-initializers warnings.
authorzrj <rimvydas.jasinskas@gmail.com>
Sat, 6 Apr 2019 17:21:24 +0000 (20:21 +0300)
committerzrj <zrj@dragonflybsd.org>
Sun, 7 Apr 2019 19:19:38 +0000 (22:19 +0300)
Use designated initializers.

lib/libkvm/kvm_getloadavg.c
lib/libkvm/kvm_getswapinfo.c

index f44d941..cd48b6f 100644 (file)
 #include "kvm_private.h"
 
 static struct nlist nl[] = {
-       { "_averunnable" },
+       { .n_name = "_averunnable" },
 #define        X_AVERUNNABLE   0
-       { "_fscale" },
+       { .n_name = "_fscale" },
 #define        X_FSCALE        1
-       { "" },
+       { .n_name = "" },
 };
 
 /*
index c10dee0..4437298 100644 (file)
 #include "kvm_private.h"
 
 static struct nlist kvm_swap_nl[] = {
-       { "_swapblist" },       /* new radix swap list          */
-       { "_swdevt" },          /* list of swap devices and sizes */
-       { "_nswdev" },          /* number of swap devices */
-       { "_dmmax" },           /* maximum size of a swap block */
-       { "" }
+       { .n_name = "_swapblist" },     /* new radix swap list */
+       { .n_name = "_swdevt" },        /* list of swap devices and sizes */
+       { .n_name = "_nswdev" },        /* number of swap devices */
+       { .n_name = "_dmmax" },         /* maximum size of a swap block */
+       { .n_name = "" }
 };
 
 #define NL_SWAPBLIST   0