aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-server/mds-server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mds-server/mds-server.c')
-rw-r--r--src/mds-server/mds-server.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mds-server/mds-server.c b/src/mds-server/mds-server.c
index 58908a4..6ee2e81 100644
--- a/src/mds-server/mds-server.c
+++ b/src/mds-server/mds-server.c
@@ -1,6 +1,6 @@
/**
* mds — A micro-display server
- * Copyright © 2014, 2015, 2016, 2017 Mattias Andrée (maandree@kth.se)
+ * Copyright © 2014, 2015, 2016, 2017 Mattias Andrée (m@maandree.se)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -98,14 +98,14 @@ preinitialise_server(void)
/* Parse command line arguments. */
for (i = 1; i < argc; i++) {
arg = argv[i];
- if (startswith(arg, "--socket-fd=")) { /* Socket file descriptor. */
+ if (strstarts(arg, "--socket-fd=")) { /* Socket file descriptor. */
exit_if (socket_fd != -1,
eprintf("duplicate declaration of %s.", "--socket-fd"););
exit_if (strict_atoi(arg += strlen("--socket-fd="), &socket_fd, 0, INT_MAX) < 0,
eprintf("invalid value for %s: %s.", "--socket-fd", arg););
- } else if (startswith(arg, "--alarm=")) { /* Schedule an alarm signal for forced abort. */
- alarm((unsigned)min(atou(arg + strlen("--alarm=")), 60)); /* At most 1 minute. */
- } else if (!strequals(arg, "--initial-spawn") && !strequals(arg, "--respawn")) {
+ } else if (strstarts(arg, "--alarm=")) { /* Schedule an alarm signal for forced abort. */
+ alarm((unsigned)MIN(atou(arg + strlen("--alarm=")), 60)); /* At most 1 minute. */
+ } else if (!streq(arg, "--initial-spawn") && !streq(arg, "--respawn")) {
/* Not recognised, it is probably for another server. */
unparsed_args[unparsed_args_ptr++] = arg;
}
@@ -523,11 +523,11 @@ run_initrc(char **args)
(xsnprintf(pathname, FORMAT, __VA_ARGS__), execv(args[0], args))
/* Test $XDG_CONFIG_HOME. */
- if ((env = getenv_nonempty("XDG_CONFIG_HOME")))
+ if ((env = getenv_ne("XDG_CONFIG_HOME")))
__exec("%s/%s", env, INITRC_FILE);
/* Test $HOME. */
- if ((env = getenv_nonempty("HOME"))) {
+ if ((env = getenv_ne("HOME"))) {
__exec("%s/.config/%s", env, INITRC_FILE);
__exec("%s/.%s", env, INITRC_FILE);
}
@@ -543,7 +543,7 @@ run_initrc(char **args)
}
/* Test $XDG_CONFIG_DIRS. */
- if ((env = getenv_nonempty("XDG_CONFIG_DIRS"))) {
+ if ((env = getenv_ne("XDG_CONFIG_DIRS"))) {
for (begin = env;;) {
end = strchrnul(begin, ':');
len = (int)(end - begin);