mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-27 11:52:03 +00:00
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>
This commit is contained in:
parent
c65d179354
commit
2738cc3cfc
1 changed files with 8 additions and 7 deletions
|
@ -122,11 +122,11 @@ static int
|
||||||
allspaces(char *a, int n)
|
allspaces(char *a, int n)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < n; i++) {
|
|
||||||
if (a[i] != ' ') {
|
for(i=0; i<n; i++)
|
||||||
|
if(a[i] != ' ')
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,10 +166,11 @@ atimes(char *ar)
|
||||||
}else if(memcmp(h.name, "// ", 3) == 0){ /* GNU */
|
}else if(memcmp(h.name, "// ", 3) == 0){ /* GNU */
|
||||||
/* date, uid, gid, mode all ' ' */
|
/* date, uid, gid, mode all ' ' */
|
||||||
if(!allspaces(&h.name[3], sizeof(h.name) - 3) ||
|
if(!allspaces(&h.name[3], sizeof(h.name) - 3) ||
|
||||||
!allspaces(h.date, sizeof(h.date)) || !allspaces(h.uid, sizeof(h.uid)) ||
|
!allspaces(h.date, sizeof(h.date)) ||
|
||||||
!allspaces(h.gid, sizeof(h.gid)) || !allspaces(h.mode, sizeof(h.mode))){
|
!allspaces(h.uid, sizeof(h.uid)) ||
|
||||||
|
!allspaces(h.gid, sizeof(h.gid)) ||
|
||||||
|
!allspaces(h.mode, sizeof(h.mode)))
|
||||||
goto skip;
|
goto skip;
|
||||||
}
|
|
||||||
t = atol(h.size);
|
t = atol(h.size);
|
||||||
if(t&01)
|
if(t&01)
|
||||||
t++;
|
t++;
|
||||||
|
|
Loading…
Reference in a new issue