space fixes

This commit is contained in:
Michael Kerrisk 2007-06-20 20:52:14 +00:00
parent 89f9f5b25d
commit d494919067
10 changed files with 13 additions and 13 deletions

View File

@ -245,7 +245,7 @@ main(void)
err = fmtmsg(class, "util-linux:mount", MM_ERROR,
"unknown mount option", "See mount(8).",
"util-linux:mount:017");
switch(err) {
switch (err) {
case MM_OK:
break;
case MM_NOTOK:

View File

@ -69,7 +69,7 @@ main(void)
getgrouplist(user, pw->pw_gid, groups, &ng);
}
for(i = 0; i < ng; i++)
for (i = 0; i < ng; i++)
printf("%d\en", groups[i]);
exit(EXIT_SUCCESS);

View File

@ -153,7 +153,7 @@ int main(int argc, char **argv)
int errfnd = 0;
while ((opt = getopt(argc, argv, "o:")) != -1) {
switch(opt) {
switch (opt) {
case 'o':
subopts = optarg;
while (*subopts != '\\0' && !errfnd) {

View File

@ -138,7 +138,7 @@ main(void)
if (n < 0)
perror("scandir");
else {
while(n\-\-) {
while (n\-\-) {
printf("%s\en", namelist[n]\->d_name);
free(namelist[n]);
}

View File

@ -237,7 +237,7 @@ foo(va_alist)
va_list ap;
va_start(ap);
while(...) {
while (...) {
...
x = va_arg(ap, type);
...
@ -289,7 +289,7 @@ foo(char *fmt, ...)
va_start(ap, fmt);
while (*fmt)
switch(*fmt++) {
switch (*fmt++) {
case 's': /* string */
s = va_arg(ap, char *);
printf("string %s\en", s);

View File

@ -79,7 +79,7 @@ strncat(char *dest, const char *src, size_t n)
size_t dest_len = strlen(dest);
int i;
for(i = 0 ; i < n && src[i] != '\\0' ; i++)
for (i = 0 ; i < n && src[i] != '\\0' ; i++)
dest[dest_len + i] = src[i];
dest[dest_len + i] = '\\0';

View File

@ -78,9 +78,9 @@ char*
strncpy(char *dest, const char *src, size_t n){
size_t i;
for(i = 0 ; i < n && src[i] != '\\0' ; i++)
for (i = 0 ; i < n && src[i] != '\\0' ; i++)
dest[i] = src[i];
for( ; i < n ; i++)
for ( ; i < n ; i++)
dest[i] = '\\0';
return dest;

View File

@ -95,7 +95,7 @@ E.g.
.br
.nf
while(something) {
while (something) {
int ret = system("foo");
if (WIFSIGNALED(ret) &&

View File

@ -218,7 +218,7 @@ action(const void *nodep, const VISIT which, const int depth)
{
int *datap;
switch(which) {
switch (which) {
case preorder:
break;
case postorder:

View File

@ -184,14 +184,14 @@ from where it stopped before.
.nf
struct epoll_event ev, *events;
for(;;) {
for (;;) {
nfds = epoll_wait(kdpfd, events, maxevents, \-1);
for (n = 0; n < nfds; ++n) {
if (events[n].data.fd == listener) {
client = accept(listener, (struct sockaddr *) &local,
&addrlen);
if(client < 0){
if (client < 0){
perror("accept");
continue;
}