]> err.no Git - util-linux/commitdiff
libblkid: minor fix in topology sample
authorKarel Zak <kzak@redhat.com>
Thu, 17 Sep 2009 22:06:17 +0000 (00:06 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 17 Sep 2009 22:06:17 +0000 (00:06 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/blkid/samples/topology.c

index c031b82c3948db7ec9068ccf49433a9c995484f2..7e5b489d3625ed3614b54305452761e6fc0e22c6 100644 (file)
@@ -63,12 +63,10 @@ int main(int argc, char *argv[])
        else if (rc == 1)
                warnx("%s: missing topology information", devname);
        else {
-               int i, nvals;
+               int i, nvals = blkid_probe_numof_values(pr);
 
                printf("----- NAME=value interface (values: %d):\n", nvals);
 
-               nvals = blkid_probe_numof_values(pr);
-
                for (i = 0; i < nvals; i++) {
                        const char *name, *data;