diff options
Diffstat (limited to 'commands/hwclock.c')
-rw-r--r-- | commands/hwclock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/commands/hwclock.c b/commands/hwclock.c index 7a5600c456..c594e070ac 100644 --- a/commands/hwclock.c +++ b/commands/hwclock.c @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: GPL-2.0-only + #include <common.h> #include <command.h> #include <getopt.h> @@ -151,11 +153,9 @@ static int do_hwclock(int argc, char *argv[]) if (env_name) { unsigned long time; - char t[12]; rtc_tm_to_time(&tm, &time); - snprintf(t, 12, "%lu", time); - setenv(env_name, t); + pr_setenv(env_name, "%lu", time); } else { printf("%s\n", time_str(&tm)); } |