From a992cfbc8fc1f7536dc42e7eb41d1ac329f25004 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 30 Oct 2017 19:48:39 -0400 Subject: [PATCH] More use of %m instead of strerror(errno) --- citadel/modules/network/serv_netmail.c | 4 ++-- citadel/modules/openid/serv_openid_rp.c | 2 +- citadel/modules/vcard/serv_vcard.c | 6 +++--- citadel/modules/wiki/serv_wiki.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/citadel/modules/network/serv_netmail.c b/citadel/modules/network/serv_netmail.c index 941a2590e..7c97c5cc4 100644 --- a/citadel/modules/network/serv_netmail.c +++ b/citadel/modules/network/serv_netmail.c @@ -2,7 +2,7 @@ * This module handles shared rooms, inter-Citadel mail, and outbound * mailing list processing. * - * Copyright (c) 2000-2016 by the citadel.org team + * Copyright (c) 2000-2017 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 3. @@ -551,7 +551,7 @@ void network_process_ignetpush(SpoolControl *sc, struct CtdlMessage *omsg, long fclose(fp); } else { - syslog(LOG_ERR, "%s: %s\n", filename, strerror(errno)); + syslog(LOG_ERR, "%s: %m", filename); } /* free the serialized version */ diff --git a/citadel/modules/openid/serv_openid_rp.c b/citadel/modules/openid/serv_openid_rp.c index b592d8156..269240bdd 100644 --- a/citadel/modules/openid/serv_openid_rp.c +++ b/citadel/modules/openid/serv_openid_rp.c @@ -839,7 +839,7 @@ void cmd_oids(char *argbuf) { CCC->openid_data = oiddata = malloc(sizeof(ctdl_openid)); if (oiddata == NULL) { - syslog(LOG_ERR, "openid: malloc() failed: %s", strerror(errno)); + syslog(LOG_ERR, "openid: malloc() failed: %m"); cprintf("%d malloc failed\n", ERROR + INTERNAL_ERROR); return; } diff --git a/citadel/modules/vcard/serv_vcard.c b/citadel/modules/vcard/serv_vcard.c index acaa7ac62..25e584fbb 100644 --- a/citadel/modules/vcard/serv_vcard.c +++ b/citadel/modules/vcard/serv_vcard.c @@ -1447,15 +1447,15 @@ CTDL_MODULE_INIT(vcard) //fclose(fp); //rv = chown(filename, CTDLUID, (-1)); //if (rv == -1) { - //syslog(LOG_ERR, "vcard: failed to adjust ownership of %s: %s", filename, strerror(errno)); + //syslog(LOG_ERR, "vcard: failed to adjust ownership of %s: %m", filename); //} //rv = chmod(filename, 0600); //if (rv == -1) { - //syslog(LOG_ERR, "vcard: failed to adjust ownership of %s: %s", filename, strerror(errno)); + //syslog(LOG_ERR, "vcard: failed to adjust ownership of %s: %m", filename); //} //} //else { - //syslog(LOG_ERR, "vcard: cannot create %s: %s", filename, strerror(errno)); + //syslog(LOG_ERR, "vcard: cannot create %s: %m", filename); //} } diff --git a/citadel/modules/wiki/serv_wiki.c b/citadel/modules/wiki/serv_wiki.c index cc1f9ed2a..c415dd975 100644 --- a/citadel/modules/wiki/serv_wiki.c +++ b/citadel/modules/wiki/serv_wiki.c @@ -1,7 +1,7 @@ /* * Server-side module for Wiki rooms. This handles things like version control. * - * Copyright (c) 2009-2015 by the citadel.org team + * Copyright (c) 2009-2017 by the citadel.org team * * This program is open source software. You can redistribute it and/or * modify it under the terms of the GNU General Public License, version 3. @@ -562,7 +562,7 @@ void wiki_rev(char *pagename, char *rev, char *operation) fclose(fp); } else { - syslog(LOG_ALERT, "Cannot open %s: %s\n", temp, strerror(errno)); + syslog(LOG_ERR, "%s: %m", temp); } CM_Free(msg); -- 2.30.2