summaryrefslogtreecommitdiffstats
path: root/login-utils
diff options
context:
space:
mode:
authorKarel Zak2019-05-23 21:27:37 +0200
committerKarel Zak2019-05-27 11:55:19 +0200
commit9c6167c394bf5a7c374a6bd626478e1079facebe (patch)
tree17bae6a01dbb74a64a3f85afad9fcff480b539a9 /login-utils
parentipcs: check return value when read from /proc [coverity scan] (diff)
downloadkernel-qcow2-util-linux-9c6167c394bf5a7c374a6bd626478e1079facebe.tar.gz
kernel-qcow2-util-linux-9c6167c394bf5a7c374a6bd626478e1079facebe.tar.xz
kernel-qcow2-util-linux-9c6167c394bf5a7c374a6bd626478e1079facebe.zip
login: retire use of __FUNCTION__ macro
This fixes following warning about deprecatd __FUNCTION__ that is another name for __func__ since GCC (pre 2.95, released July 1999). login-utils/login.c:860:10: warning: ISO C does not support ‘__FUNCTION__’ predefined identifier [-Wpedantic] Co-Author: Sami Kerola <kerolasa@iki.fi> Reference: https://c0x.coding-guidelines.com/6.4.2.2.html Reference: https://github.com/karelzak/util-linux/pull/802 Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils')
-rw-r--r--login-utils/login.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/login-utils/login.c b/login-utils/login.c
index a2d2725a6..ce112b54e 100644
--- a/login-utils/login.c
+++ b/login-utils/login.c
@@ -856,8 +856,7 @@ static void loginpam_acct(struct login_context *cxt)
if (!cxt->username || !*cxt->username) {
warnx(_("\nSession setup problem, abort."));
- syslog(LOG_ERR, _("NULL user name in %s:%d. Abort."),
- __FUNCTION__, __LINE__);
+ syslog(LOG_ERR, _("NULL user name. Abort."));
pam_end(pamh, PAM_SYSTEM_ERR);
sleepexit(EXIT_FAILURE);
}
@@ -1246,8 +1245,8 @@ int main(int argc, char **argv)
cxt.pwd = xgetpwnam(cxt.username, &cxt.pwdbuf);
if (!cxt.pwd) {
warnx(_("\nSession setup problem, abort."));
- syslog(LOG_ERR, _("Invalid user name \"%s\" in %s:%d. Abort."),
- cxt.username, __FUNCTION__, __LINE__);
+ syslog(LOG_ERR, _("Invalid user name \"%s\". Abort."),
+ cxt.username);
pam_end(cxt.pamh, PAM_SYSTEM_ERR);
sleepexit(EXIT_FAILURE);
}