From 41e32d9f8b556671ff45bd5e4b31c842814a6397 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 13 Feb 2012 15:30:30 +0100 Subject: [PATCH] fsck: cosmetic changes in coding style Signed-off-by: Karel Zak --- fsck/fsck.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/fsck/fsck.c b/fsck/fsck.c index 7eb5f0203..27aab4666 100644 --- a/fsck/fsck.c +++ b/fsck/fsck.c @@ -1,5 +1,5 @@ /* - * pfsck --- A generic, parallelizing front-end for the fsck program. + * fsck --- A generic, parallelizing front-end for the fsck program. * It will automatically try to run fsck programs in parallel if the * devices are on separate spindles. It is based on the same ideas as * the generic front end for fsck by David Engel and Fred van Kempen, @@ -19,7 +19,7 @@ * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, * 2001, 2002, 2003, 2004, 2005 by Theodore Ts'o. * - * Copyright (C) 2009 Karel Zak + * Copyright (C) 2009, 2012 Karel Zak * * This file may be redistributed under the terms of the GNU Public * License. @@ -330,8 +330,6 @@ static void unlock_disk(struct fsck_instance *inst) } } - - static void free_instance(struct fsck_instance *i) { if (lockdisk) @@ -498,21 +496,22 @@ static struct fs_info *lookup(char *filesys) /* Find fsck program for a given fs type. */ static char *find_fsck(char *type) { - char *s; - const char *tpl; - static char prog[256]; - char *p = string_copy(fsck_path); - struct stat st; + char *s; + const char *tpl; + static char prog[256]; + char *p = string_copy(fsck_path); + struct stat st; - /* Are we looking for a program or just a type? */ - tpl = (strncmp(type, "fsck.", 5) ? "%s/fsck.%s" : "%s/%s"); + /* Are we looking for a program or just a type? */ + tpl = (strncmp(type, "fsck.", 5) ? "%s/fsck.%s" : "%s/%s"); - for(s = strtok(p, ":"); s; s = strtok(NULL, ":")) { - sprintf(prog, tpl, s, type); - if (stat(prog, &st) == 0) break; - } - free(p); - return(s ? prog : NULL); + for(s = strtok(p, ":"); s; s = strtok(NULL, ":")) { + sprintf(prog, tpl, s, type); + if (stat(prog, &st) == 0) break; + } + free(p); + + return(s ? prog : NULL); } static int progress_active(NOARGS)