*: remove some uses of argc
[oweals/busybox.git] / e2fsprogs / old_e2fsprogs / blkid / devname.c
index 3d11734d5b05d2ff787fddbea5eb60a799b06c2c..348e5d42e534debff0a2f6288510a058a2482c14 100644 (file)
@@ -131,7 +131,6 @@ set_pri:
                pri = BLKID_PRI_MD;
        if (dev)
                dev->bid_pri = pri;
-       return;
 }
 
 #define PROC_PARTITIONS "/proc/partitions"
@@ -153,7 +152,7 @@ static dev_t lvm_get_devno(const char *lvm_device)
        dev_t ret = 0;
 
        DBG(DEBUG_DEVNAME, printf("opening %s\n", lvm_device));
-       if ((lvf = fopen(lvm_device, "r")) == NULL) {
+       if ((lvf = fopen_for_read(lvm_device)) == NULL) {
                DBG(DEBUG_DEVNAME, printf("%s: (%d) %s\n", lvm_device, errno,
                                          strerror(errno)));
                return 0;
@@ -234,11 +233,11 @@ evms_probe_all(blkid_cache cache)
        FILE *procpt;
        char device[110];
 
-       procpt = fopen(PROC_EVMS_VOLUMES, "r");
+       procpt = fopen_for_read(PROC_EVMS_VOLUMES);
        if (!procpt)
                return 0;
        while (fgets(line, sizeof(line), procpt)) {
-               if (sscanf (line, " %d %d %d %*s %*s %[^\n ]",
+               if (sscanf(line, " %d %d %d %*s %*s %[^\n ]",
                            &ma, &mi, &sz, device) != 4)
                        continue;
 
@@ -274,7 +273,7 @@ int blkid_probe_all(blkid_cache cache)
                return -BLKID_ERR_PARAM;
 
        if (cache->bic_flags & BLKID_BIC_FL_PROBED &&
-           time(0) - cache->bic_time < BLKID_PROBE_INTERVAL)
+           time(NULL) - cache->bic_time < BLKID_PROBE_INTERVAL)
                return 0;
 
        blkid_read_cache(cache);
@@ -283,7 +282,7 @@ int blkid_probe_all(blkid_cache cache)
        lvm_probe_all(cache);
 #endif
 
-       proc = fopen(PROC_PARTITIONS, "r");
+       proc = fopen_for_read(PROC_PARTITIONS);
        if (!proc)
                return -BLKID_ERR_PROC;
 
@@ -336,7 +335,7 @@ int blkid_probe_all(blkid_cache cache)
 
        fclose(proc);
 
-       cache->bic_time = time(0);
+       cache->bic_time = time(NULL);
        cache->bic_flags |= BLKID_BIC_FL_PROBED;
        blkid_flush_cache(cache);
        return 0;