summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell-completion/bash/machinectl4
-rw-r--r--src/shared/logs-show.c5
-rw-r--r--src/timedate/timedatectl.c2
3 files changed, 5 insertions, 6 deletions
diff --git a/shell-completion/bash/machinectl b/shell-completion/bash/machinectl
index 0d09258a0b..0534c0d9cc 100644
--- a/shell-completion/bash/machinectl
+++ b/shell-completion/bash/machinectl
@@ -40,8 +40,8 @@ _machinectl() {
)
local -A VERBS=(
- [STANDALONE]='list list-images'
- [MACHINES]='status show start login enable disable poweroff reboot terminate kill copy-to copy-from image-status show-image clone rename read-only remove set-limit list-transfers cancel-transfer'
+ [STANDALONE]='list list-images pull-tar pull-raw pull-dkr import-tar import-raw export-tar export-raw list-transfers cancel-transfer'
+ [MACHINES]='status show start login enable disable poweroff reboot terminate kill copy-to copy-from image-status show-image clone rename read-only remove set-limit'
)
_init_completion || return
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
index b78cb7678c..60144ab8a6 100644
--- a/src/shared/logs-show.c
+++ b/src/shared/logs-show.c
@@ -575,7 +575,6 @@ void json_escape(
assert(p);
if (!(flags & OUTPUT_SHOW_ALL) && l >= JSON_THRESHOLD)
-
fputs("null", f);
else if (!utf8_is_printable(p, l)) {
@@ -605,8 +604,8 @@ void json_escape(
fputc(*p, f);
} else if (*p == '\n')
fputs("\\n", f);
- else if (*p < ' ')
- fprintf(f, "\\u%04x", *p);
+ else if ((uint8_t) *p < ' ')
+ fprintf(f, "\\u%04x", (uint8_t) *p);
else
fputc(*p, f);
diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c
index 240578bca0..8ec6adb493 100644
--- a/src/timedate/timedatectl.c
+++ b/src/timedate/timedatectl.c
@@ -96,7 +96,7 @@ static void print_status_info(const StatusInfo *i) {
old_tz = strdupa(tz);
/* Set the new $TZ */
- if (setenv("TZ", i->timezone, true) < 0)
+ if (i->timezone && setenv("TZ", i->timezone, true) < 0)
log_warning_errno(errno, "Failed to set TZ environment variable, ignoring: %m");
else
tzset();