On Mon, 9 Mar 2009 09:46:12 +0100, Andre Prendel wrote: > Fix coding style in sensord.c > (...) > +static void daemonize(void) > +{ > + int pid; > + struct stat fileStat; > + FILE *file; > + > + if (chdir("/") < 0) { > + perror("chdir()"); > + exit(EXIT_FAILURE); > + } > + > + if (!(stat(pidFile, &fileStat)) && > + ((!S_ISREG(fileStat.st_mode)) || (fileStat.st_size > 11))) { > + fprintf(stderr, > + "Error: PID file `%s' already exists and looks suspicious.\n", > + pidFile); > + exit(EXIT_FAILURE); > + } > Trailing white space, could be stripped (and a few other occurrences in this file.) > - if (!(file = fopen (pidFile, "w"))) { > - fprintf (stderr, "fopen(\"%s\"): %s\n", pidFile, strerror (errno)); > - exit (EXIT_FAILURE); > - } -- Jean Delvare