aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-respawn.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-11-05 00:09:50 +0100
committerMattias Andrée <maandree@kth.se>2017-11-05 00:09:50 +0100
commit9e8dec188d55ca1f0a3b33acab702ced8ed07a18 (patch)
treecbb43c22e72674dc672e645e6596358e3868568e /src/mds-respawn.h
parenttypo (diff)
downloadmds-9e8dec188d55ca1f0a3b33acab702ced8ed07a18.tar.gz
mds-9e8dec188d55ca1f0a3b33acab702ced8ed07a18.tar.bz2
mds-9e8dec188d55ca1f0a3b33acab702ced8ed07a18.tar.xz
Work on changing style, and an important typo fix
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--src/mds-respawn.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/mds-respawn.h b/src/mds-respawn.h
index fb0e4fd..d1acd67 100644
--- a/src/mds-respawn.h
+++ b/src/mds-respawn.h
@@ -29,27 +29,27 @@
/**
* The server has not started yet
*/
-#define UNBORN 0
+#define UNBORN 0
/**
* The server is up and running
*/
-#define ALIVE 1
+#define ALIVE 1
/**
* The server has crashed and will be respawn momentarily
*/
-#define DEAD 2
+#define DEAD 2
/**
* The server crashed too fast, it will only respawn if SIGUSR2 is received
*/
-#define DEAD_AND_BURIED 3
+#define DEAD_AND_BURIED 3
/**
* The server has exited successfully, it will never be respawn again
*/
-#define CREMATED 4
+#define CREMATED 4
@@ -59,7 +59,7 @@
* @param VALUE:int The state
* @return :int Whether the state is value
*/
-#define validate_state(VALUE) ((UNBORN <= VALUE) && (VALUE <= CREMATED))
+#define validate_state(VALUE) (UNBORN <= (VALUE) && (VALUE) <= CREMATED)
@@ -68,21 +68,21 @@
*/
typedef struct server_state
{
- /**
- * The server's process ID
- */
- pid_t pid;
-
- /**
- * The server's state
- */
- int state;
-
- /**
- * The time (monotonic) the server started
- */
- struct timespec started;
-
+ /**
+ * The server's process ID
+ */
+ pid_t pid;
+
+ /**
+ * The server's state
+ */
+ int state;
+
+ /**
+ * The time (monotonic) the server started
+ */
+ struct timespec started;
+
} server_state_t;