X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Freadahead%2Fsd-readahead.c;h=675d82cdd18bf9c87dc64006c64ca77e2c5ffa77;hb=51d122af23533b0b8318911c4fc8b128ad8eafb7;hp=a3340666dd7326f3bcd8e0f713c563867c474d7d;hpb=19c5f19d69bb5f520fa7213239490c55de06d99d;p=elogind.git diff --git a/src/readahead/sd-readahead.c b/src/readahead/sd-readahead.c index a3340666d..675d82cdd 100644 --- a/src/readahead/sd-readahead.c +++ b/src/readahead/sd-readahead.c @@ -25,7 +25,7 @@ ***/ #ifndef _GNU_SOURCE -#define _GNU_SOURCE +# define _GNU_SOURCE #endif #include @@ -38,15 +38,15 @@ #include "sd-readahead.h" #if (__GNUC__ >= 4) -#ifdef SD_EXPORT_SYMBOLS +# ifdef SD_EXPORT_SYMBOLS /* Export symbols */ -#define _sd_export_ __attribute__ ((visibility("default"))) -#else +# define _sd_export_ __attribute__ ((visibility("default"))) +# else /* Don't export the symbols */ -#define _sd_export_ __attribute__ ((visibility("hidden"))) -#endif +# define _sd_export_ __attribute__ ((visibility("hidden"))) +# endif #else -#define _sd_export_ +# define _sd_export_ #endif static int touch(const char *path) { @@ -57,14 +57,15 @@ static int touch(const char *path) { mkdir("/run/systemd", 0755); mkdir("/run/systemd/readahead", 0755); - if ((fd = open(path, O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY, 0666)) < 0) + fd = open(path, O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY, 0666); + if (fd < 0) return -errno; for (;;) { if (close(fd) >= 0) break; - if (errno != -EINTR) + if (errno != EINTR) return -errno; }