aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/mk
diff options
context:
space:
mode:
authorDan Cross <cross@gajendra.net>2020-01-08 01:36:49 +0000
committerDan Cross <cross@gajendra.net>2020-01-08 01:37:44 +0000
commit2738cc3cfc053a5922aee655405c0ab620beae0f (patch)
tree600fbe71efbe9988274daea8bd942577cf2003b5 /src/cmd/mk
parentc65d179354fd3fd6f9719531f3414cf1c9c5280a (diff)
downloadplan9port-2738cc3cfc053a5922aee655405c0ab620beae0f.tar.gz
plan9port-2738cc3cfc053a5922aee655405c0ab620beae0f.tar.bz2
plan9port-2738cc3cfc053a5922aee655405c0ab620beae0f.zip
mk: plan9 style.
In general, no space after `if` etc, and no braces for a single statement inside of a loop or conditional. Signed-off-by: Dan Cross <cross@gajendra.net>
Diffstat (limited to 'src/cmd/mk')
-rw-r--r--src/cmd/mk/archive.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/cmd/mk/archive.c b/src/cmd/mk/archive.c
index 6869bacf..026641bd 100644
--- a/src/cmd/mk/archive.c
+++ b/src/cmd/mk/archive.c
@@ -122,11 +122,11 @@ static int
allspaces(char *a, int n)
{
int i;
- for (i = 0; i < n; i++) {
- if (a[i] != ' ') {
+
+ for(i=0; i<n; i++)
+ if(a[i] != ' ')
return 0;
- }
- }
+
return 1;
}
@@ -166,10 +166,11 @@ atimes(char *ar)
}else if(memcmp(h.name, "// ", 3) == 0){ /* GNU */
/* date, uid, gid, mode all ' ' */
if(!allspaces(&h.name[3], sizeof(h.name) - 3) ||
- !allspaces(h.date, sizeof(h.date)) || !allspaces(h.uid, sizeof(h.uid)) ||
- !allspaces(h.gid, sizeof(h.gid)) || !allspaces(h.mode, sizeof(h.mode))){
+ !allspaces(h.date, sizeof(h.date)) ||
+ !allspaces(h.uid, sizeof(h.uid)) ||
+ !allspaces(h.gid, sizeof(h.gid)) ||
+ !allspaces(h.mode, sizeof(h.mode)))
goto skip;
- }
t = atol(h.size);
if(t&01)
t++;