[hackers] [ubase] Fix indentation for mount(8) || sin

From: <git_AT_suckless.org>
Date: Mon, 17 Mar 2014 13:49:09 +0100

commit e91b3d9e716117f39162355d448d5e1dc4909952
Author: sin <sin_AT_2f30.org>
Date: Mon Mar 17 14:46:35 2014 +0200

    Fix indentation for mount(8)
    
    No functional change intended.

diff --git a/mount.c b/mount.c
index 22abdf5..6e2a6ec 100644
--- a/mount.c
+++ b/mount.c
_AT_@ -129,29 +129,29 @@ main(int argc, char *argv[])
         }
 
         for(i = 0; files[i]; i++) {
- if((fp = setmntent(files[i], "r"))) {
- while((me = getmntent(fp))) {
- if(strcmp(me->mnt_dir, target) == 0 ||
- strcmp(me->mnt_fsname, target) == 0 ||
- (source && strcmp(me->mnt_dir, source) == 0) ||
- (source && strcmp(me->mnt_fsname, source) == 0)) {
- if(!source) {
- target = me->mnt_dir;
- source = me->mnt_fsname;
- }
- if(!oflag)
- parseopts(me->mnt_opts, &flags, data, datasiz);
- if(!types)
- types = me->mnt_type;
- goto mountsingle;
- }
- }
- endmntent(fp);
- fp = NULL;
- } else {
+ if(!(fp = setmntent(files[i], "r"))) {
                         if (strcmp(files[i], "/proc/mounts") != 0)
                                 weprintf("setmntent %s:", files[i]);
+ continue;
                 }
+ while((me = getmntent(fp))) {
+ if(strcmp(me->mnt_dir, target) == 0 ||
+ strcmp(me->mnt_fsname, target) == 0 ||
+ (source && strcmp(me->mnt_dir, source) == 0) ||
+ (source && strcmp(me->mnt_fsname, source) == 0)) {
+ if(!source) {
+ target = me->mnt_dir;
+ source = me->mnt_fsname;
+ }
+ if(!oflag)
+ parseopts(me->mnt_opts, &flags, data, datasiz);
+ if(!types)
+ types = me->mnt_type;
+ goto mountsingle;
+ }
+ }
+ endmntent(fp);
+ fp = NULL;
         }
         if(!source)
                 eprintf("can't find %s in /etc/fstab
", target);
Received on Mon Mar 17 2014 - 13:49:09 CET

This archive was generated by hypermail 2.3.0 : Mon Mar 17 2014 - 14:00:14 CET