From d22b71af47b44c1c1d84195743c34b589e6ab19c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 20 Feb 2010 00:47:45 +0100 Subject: src: reindent for 8ch indenting I am slowly moving all my projects to kernel-inspired 8ch indenting. This will break patches that haven't been merged yet, which I am aware of, but OTOH in times of git's --ignore-space-change shouldn't be too problematic. Yes, I am aware that reindenting like this sucks, but I cannot stand 4ch indenting anymore. Sorry. --- src/fork-detect.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'src/fork-detect.c') diff --git a/src/fork-detect.c b/src/fork-detect.c index 622037c..d416eb3 100644 --- a/src/fork-detect.c +++ b/src/fork-detect.c @@ -1,3 +1,5 @@ +/*-*- Mode: C; c-basic-offset: 8 -*-*/ + /*** This file is part of libcanberra. @@ -28,24 +30,24 @@ #include "fork-detect.h" int ca_detect_fork(void) { - static volatile pid_t pid = (pid_t) -1; - pid_t v; + static volatile pid_t pid = (pid_t) -1; + pid_t v; - /* Some really stupid applications (Hey, vim, that means you!) - * love to fork after initializing gtk/libcanberra. This is really - * bad style. We however have to deal with this cleanly, so we try - * to detect the forks making sure all our calls fail cleanly - * after the fork. */ + /* Some really stupid applications (Hey, vim, that means you!) + * love to fork after initializing gtk/libcanberra. This is really + * bad style. We however have to deal with this cleanly, so we try + * to detect the forks making sure all our calls fail cleanly + * after the fork. */ - /* Ideally we'd use atomic operations here, but we don't have them - * and this is not exactly crucial, so we don't care */ + /* Ideally we'd use atomic operations here, but we don't have them + * and this is not exactly crucial, so we don't care */ - v = pid; + v = pid; - if (v == getpid() || v == (pid_t) -1) { - pid = getpid(); - return 0; - } + if (v == getpid() || v == (pid_t) -1) { + pid = getpid(); + return 0; + } - return 1; + return 1; } -- cgit