summaryrefslogtreecommitdiff
path: root/src/tty-ask-password-agent
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-09-25 13:36:54 +0200
committerDaniel Mack <daniel@zonque.org>2015-09-30 11:41:03 +0200
commit5cfee41459d54e13fd61238a0440cd4453421ed6 (patch)
tree1635065a8f9d9c0950aabef6fe37a50b91fb4494 /src/tty-ask-password-agent
parent2ea69f8d5e4a83397c5050914adf6452cafa9559 (diff)
tree-wide: use strempty() where possible
Also add a Coccinell patch to detect such locations in the future.
Diffstat (limited to 'src/tty-ask-password-agent')
-rw-r--r--src/tty-ask-password-agent/tty-ask-password-agent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c
index b50f114a34..4630eb94f1 100644
--- a/src/tty-ask-password-agent/tty-ask-password-agent.c
+++ b/src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -256,7 +256,7 @@ static int parse_password(const char *filename, char **wall) {
if (asprintf(&_wall,
"%s%sPassword entry required for \'%s\' (PID %u).\r\n"
"Please enter password with the systemd-tty-ask-password-agent tool!",
- *wall ? *wall : "",
+ strempty(*wall),
*wall ? "\r\n\r\n" : "",
message,
pid) < 0)