summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2004-01-24 15:35:04 +0000
committerdes <des@FreeBSD.org>2004-01-24 15:35:04 +0000
commitba5185bd32d6a1bd08b7d530865a3d6ecaab45c6 (patch)
treefb19921da84324d3910b916a97c166afc0ef84a9 /usr.sbin
parent1f8956fc770d4d8201c66e4d90f5acbae225d4d6 (diff)
downloadFreeBSD-src-ba5185bd32d6a1bd08b7d530865a3d6ecaab45c6.zip
FreeBSD-src-ba5185bd32d6a1bd08b7d530865a3d6ecaab45c6.tar.gz
Try to apply consistent indentation.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_install/add/extract.c39
1 files changed, 19 insertions, 20 deletions
diff --git a/usr.sbin/pkg_install/add/extract.c b/usr.sbin/pkg_install/add/extract.c
index e76cede..3b84abd 100644
--- a/usr.sbin/pkg_install/add/extract.c
+++ b/usr.sbin/pkg_install/add/extract.c
@@ -27,28 +27,27 @@ __FBSDID("$FreeBSD$");
#define STARTSTRING "tar cf - "
-#define TOOBIG(str) (((int)strlen(str) + FILENAME_MAX + where_count > maxargs) \
- || ((int)strlen(str) + FILENAME_MAX + perm_count > maxargs))
+#define TOOBIG(str) \
+ (((int)strlen(str) + FILENAME_MAX + where_count > maxargs) ||\
+ ((int)strlen(str) + FILENAME_MAX + perm_count > maxargs))
#define PUSHOUT(todir) /* push out string */ \
- if (where_count > (int)sizeof(STARTSTRING)-1) { \
- strcat(where_args, "|tar --unlink -xpf - -C "); \
- strcat(where_args, todir); \
- if (system(where_args)) { \
- cleanup(0); \
- errx(2, \
- "%s: can not invoke %ld byte tar pipeline: %s", \
- __func__, \
- (long)strlen(where_args), where_args); \
- } \
- strcpy(where_args, STARTSTRING); \
- where_count = sizeof(STARTSTRING)-1; \
+ if (where_count > (int)sizeof(STARTSTRING)-1) { \
+ strcat(where_args, "|tar --unlink -xpf - -C "); \
+ strcat(where_args, todir); \
+ if (system(where_args)) { \
+ cleanup(0); \
+ errx(2, "%s: can not invoke %ld byte tar pipeline: %s", \
+ __func__, (long)strlen(where_args), where_args); \
} \
- if (perm_count) { \
- apply_perms(todir, perm_args); \
- perm_args[0] = 0;\
- perm_count = 0; \
- }
+ strcpy(where_args, STARTSTRING); \
+ where_count = sizeof(STARTSTRING)-1; \
+ } \
+ if (perm_count) { \
+ apply_perms(todir, perm_args); \
+ perm_args[0] = 0;\
+ perm_count = 0; \
+ }
static void
rollback(const char *name, const char *home, PackingList start, PackingList stop)
@@ -134,7 +133,7 @@ extract_plist(const char *home, Package *pkg)
cleanup(0);
errx(2, "%s: Bogus filename \"%s\"", __func__, p->name);
}
-
+
/* first try to rename it into place */
snprintf(try, FILENAME_MAX, "%s/%s", Directory, p->name);
if (fexists(try)) {
OpenPOWER on IntegriCloud