summaryrefslogtreecommitdiff
path: root/src/sleep/sleep.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-01-08 17:30:07 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-01-11 18:17:33 -0500
commit4968105790c65af58d4ab42bffa2a4bedc0be8ee (patch)
tree671df60ccecab777fe10672b115bfe870bbd5bde /src/sleep/sleep.c
parent87b934960ab514dec4b96ed4ef23c40bc61d3ceb (diff)
Simplify execute_directory()
Remove the optional sepearate opening of the directory, it would be just too complicated with the change to multiple directories. Move the middle of execute_directory() to a seperate function to make it easier to grok.
Diffstat (limited to 'src/sleep/sleep.c')
-rw-r--r--src/sleep/sleep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index 56b963a729..2fb5f0c8e0 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -107,7 +107,7 @@ static int execute(char **modes, char **states) {
if (r < 0)
return r;
- execute_directory(SYSTEM_SLEEP_PATH, NULL, DEFAULT_TIMEOUT_USEC, arguments);
+ execute_directory(SYSTEM_SLEEP_PATH, DEFAULT_TIMEOUT_USEC, arguments);
log_struct(LOG_INFO,
LOG_MESSAGE_ID(SD_MESSAGE_SLEEP_START),
@@ -126,7 +126,7 @@ static int execute(char **modes, char **states) {
NULL);
arguments[1] = (char*) "post";
- execute_directory(SYSTEM_SLEEP_PATH, NULL, DEFAULT_TIMEOUT_USEC, arguments);
+ execute_directory(SYSTEM_SLEEP_PATH, DEFAULT_TIMEOUT_USEC, arguments);
return r;
}