Module Name:    src
Committed By:   yamt
Date:           Mon Jun  8 21:58:44 UTC 2009

Modified Files:
        src/usr.bin/xinstall: xinstall.c

Log Message:
tabify and wrap long lines.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/usr.bin/xinstall/xinstall.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/xinstall/xinstall.c
diff -u src/usr.bin/xinstall/xinstall.c:1.110 src/usr.bin/xinstall/xinstall.c:1.111
--- src/usr.bin/xinstall/xinstall.c:1.110	Mon Jun  8 14:22:01 2009
+++ src/usr.bin/xinstall/xinstall.c	Mon Jun  8 21:58:44 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: xinstall.c,v 1.110 2009/06/08 14:22:01 gson Exp $	*/
+/*	$NetBSD: xinstall.c,v 1.111 2009/06/08 21:58:44 yamt Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993
@@ -46,7 +46,7 @@
 #if 0
 static char sccsid[] = "@(#)xinstall.c	8.1 (Berkeley) 7/21/93";
 #else
-__RCSID("$NetBSD: xinstall.c,v 1.110 2009/06/08 14:22:01 gson Exp $");
+__RCSID("$NetBSD: xinstall.c,v 1.111 2009/06/08 21:58:44 yamt Exp $");
 #endif
 #endif /* not lint */
 
@@ -1096,15 +1096,15 @@
 void
 install_dir(char *path, u_int flags)
 {
-        char		*p;
-        struct stat	sb;
-        int		ch;
-
-        for (p = path;; ++p)
-                if (!*p || (p != path && *p  == '/')) {
-                        ch = *p;
-                        *p = '\0';
-                        if (mkdir(path, 0777) < 0) {
+	char		*p;
+	struct stat	sb;
+	int		ch;
+
+	for (p = path;; ++p)
+		if (!*p || (p != path && *p  == '/')) {
+			ch = *p;
+			*p = '\0';
+			if (mkdir(path, 0777) < 0) {
 				/*
 				 * Can't create; path exists or no perms.
 				 * stat() path to determine what's there now.
@@ -1115,14 +1115,16 @@
 					/* Not there; use mkdir()s error */
 					errno = sverrno;
 					err(1, "%s: mkdir", path);
-                                }
+				}
 				if (!S_ISDIR(sb.st_mode)) {
-					errx(1, "%s exists but is not a directory", path);
+					errx(1,
+					    "%s exists but is not a directory",
+					    path);
 				}
 			}
-                        if (!(*p = ch))
+			if (!(*p = ch))
 				break;
-                }
+		}
 
 	if (afterinstallcmd != NULL)
 		afterinstall(afterinstallcmd, path, 0);
@@ -1130,7 +1132,7 @@
 	if (!dounpriv && (
 	    ((flags & (HASUID | HASGID)) && chown(path, uid, gid) == -1)
 	    || chmod(path, mode) == -1 )) {
-                warn("%s: chown/chmod", path);
+		warn("%s: chown/chmod", path);
 	}
 	metadata_log(path, "dir", NULL, NULL, NULL, 0);
 }

Reply via email to