Style inquistion for util and some tools.

This commit is contained in:
Christoph Lohmann
2013-03-05 21:46:48 +01:00
parent 52d39e35c2
commit f8dc6883a3
15 changed files with 100 additions and 32 deletions

View File

@@ -1,5 +1,6 @@
/* See LICENSE file for copyright and license details. */
#include <sys/stat.h>
#include "../util.h"
void
@@ -7,9 +8,14 @@ fnck(const char *a, const char *b, int (*fn)(const char *, const char *))
{
struct stat sta, stb;
if(stat(a, &sta) == 0 && stat(b, &stb) == 0
&& sta.st_dev == stb.st_dev && sta.st_ino == stb.st_ino)
if(stat(a, &sta) == 0
&& stat(b, &stb) == 0
&& sta.st_dev == stb.st_dev
&& sta.st_ino == stb.st_ino) {
eprintf("%s -> %s: same file\n", a, b);
}
if(fn(a, b) == -1)
eprintf("%s -> %s:", a, b);
}