[PATCH 6/7] sensord: Coding style conversion (gnu -> kernel)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux