More use of %m instead of strerror(errno)
authorArt Cancro <ajc@citadel.org>
Mon, 30 Oct 2017 23:48:39 +0000 (19:48 -0400)
committerArt Cancro <ajc@citadel.org>
Mon, 30 Oct 2017 23:48:39 +0000 (19:48 -0400)
citadel/modules/network/serv_netmail.c
citadel/modules/openid/serv_openid_rp.c
citadel/modules/vcard/serv_vcard.c
citadel/modules/wiki/serv_wiki.c

index 941a2590e26fdef302c19f9354feeb91636c80d4..7c97c5cc4ea3a887610e3fab63c8bbf59a305c15 100644 (file)
@@ -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 */
index b592d8156c090f548eff4f9469a050042b0cf530..269240bddb31d7013aa7ec688980285cff6e0a0a 100644 (file)
@@ -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;
        }
index acaa7ac620d7d3988ee503fd4debf20d81703f9f..25e584fbb698a3954294a38bf4c3126773e1d9aa 100644 (file)
@@ -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);
                        //}
                }
 
index cc1f9ed2a0eaadcdf255b48b512b8a87587ed4a3..c415dd97551dbb268c17316aeb621c4a477f7e68 100644 (file)
@@ -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);