diff options
author | Rob Landley <rob@landley.net> | 2018-11-19 10:54:26 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2018-11-19 10:54:26 -0600 |
commit | 3d4219014ae5f5a6553423994ff5ccd1d490a6fc (patch) | |
tree | 1be5bf5d1c054d8f385a1d9dd109513641b52f4a /toys/pending/getty.c | |
parent | 503e6362290d56bce0ed71f8164f24e25108bbbc (diff) | |
download | toybox-3d4219014ae5f5a6553423994ff5ccd1d490a6fc.tar.gz |
Eduardas Meile reported "The -Werror=format-security flag is applied by
default in Yocto 2.6 Thud release" and identified several error_exit() and
friends that should use the _raw versions.
Diffstat (limited to 'toys/pending/getty.c')
-rw-r--r-- | toys/pending/getty.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/toys/pending/getty.c b/toys/pending/getty.c index 25d04eaa..51b58962 100644 --- a/toys/pending/getty.c +++ b/toys/pending/getty.c @@ -278,8 +278,7 @@ static void utmp_entry(void) strlen("/dev/"), UT_LINESIZE); time((time_t *)&entry.ut_time); xstrncpy(entry.ut_user, "LOGIN", UT_NAMESIZE); - if (strlen(TT.host_str) > UT_HOSTSIZE) - perror_msg(utmperr); + if (strlen(TT.host_str) > UT_HOSTSIZE) perror_msg_raw(utmperr); else xstrncpy(entry.ut_host, TT.host_str, UT_HOSTSIZE); setutent(); pututline(&entry); @@ -287,8 +286,7 @@ static void utmp_entry(void) } xstrncpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/"), UT_LINESIZE); xstrncpy(entry.ut_user, "LOGIN", UT_NAMESIZE); - if (strlen(TT.host_str) > UT_HOSTSIZE) - perror_msg(utmperr); + if (strlen(TT.host_str) > UT_HOSTSIZE) perror_msg_raw(utmperr); else xstrncpy(entry.ut_host, TT.host_str, UT_HOSTSIZE); time((time_t *)&entry.ut_time); setutent(); |