diff options
author | Philipp Klaus Krause <pkk@spth.de> | 2020-10-14 09:52:26 +0200 |
---|---|---|
committer | Philipp Klaus Krause <pkk@spth.de> | 2020-10-14 09:52:26 +0200 |
commit | 6a276e74e37b8843a58e85e836bfceee73d4effe (patch) | |
tree | 94ba532cfe65f45df33f8ad29fd88892c1e59948 /src | |
parent | 72ce934b58889be3c091ab14d9a0879a54067d34 (diff) | |
download | profani-tty-6a276e74e37b8843a58e85e836bfceee73d4effe.tar.gz |
Since the string from strerror should never be modified, use const.
Diffstat (limited to 'src')
-rw-r--r-- | src/config/scripts.c | 2 | ||||
-rw-r--r-- | src/database.c | 2 | ||||
-rw-r--r-- | src/omemo/omemo.c | 2 | ||||
-rw-r--r-- | src/pgp/gpg.c | 2 | ||||
-rw-r--r-- | src/ui/inputwin.c | 2 | ||||
-rw-r--r-- | src/xmpp/avatar.c | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/src/config/scripts.c b/src/config/scripts.c index ec34fdaf..22b3080c 100644 --- a/src/config/scripts.c +++ b/src/config/scripts.c @@ -58,7 +58,7 @@ scripts_init(void) errno = 0; int res = g_mkdir_with_parents(scriptsdir, S_IRWXU); if (res == -1) { - char* errmsg = strerror(errno); + const char* errmsg = strerror(errno); if (errmsg) { log_error("Error creating directory: %s, %s", scriptsdir, errmsg); } else { diff --git a/src/database.c b/src/database.c index 37fe5a03..5ea981f8 100644 --- a/src/database.c +++ b/src/database.c @@ -60,7 +60,7 @@ _get_db_filename(ProfAccount* account) int res = g_mkdir_with_parents(database_dir, S_IRWXU); if (res == -1) { - char* errmsg = strerror(errno); + const char* errmsg = strerror(errno); if (errmsg) { log_error("DATABASE: error creating directory: %s, %s", database_dir, errmsg); } else { diff --git a/src/omemo/omemo.c b/src/omemo/omemo.c index 2060454b..c6c34ac1 100644 --- a/src/omemo/omemo.c +++ b/src/omemo/omemo.c @@ -240,7 +240,7 @@ omemo_on_connect(ProfAccount* account) errno = 0; int res = g_mkdir_with_parents(omemo_dir, S_IRWXU); if (res == -1) { - char* errmsg = strerror(errno); + const char* errmsg = strerror(errno); if (errmsg) { log_error("OMEMO: error creating directory: %s, %s", omemo_dir, errmsg); } else { diff --git a/src/pgp/gpg.c b/src/pgp/gpg.c index 7be1e5c9..1c2d2aca 100644 --- a/src/pgp/gpg.c +++ b/src/pgp/gpg.c @@ -167,7 +167,7 @@ p_gpg_on_connect(const char* const barejid) errno = 0; int res = g_mkdir_with_parents(pubsfile, S_IRWXU); if (res == -1) { - char* errmsg = strerror(errno); + const char* errmsg = strerror(errno); if (errmsg) { log_error("Error creating directory: %s, %s", pubsfile, errmsg); } else { diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index 5da6ae97..d4feee27 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -172,7 +172,7 @@ inp_readline(void) pthread_mutex_lock(&lock); if (r < 0) { if (errno != EINTR) { - char* err_msg = strerror(errno); + const char* err_msg = strerror(errno); log_error("Readline failed: %s", err_msg); } return NULL; diff --git a/src/xmpp/avatar.c b/src/xmpp/avatar.c index b6263a7f..b3d1dce9 100644 --- a/src/xmpp/avatar.c +++ b/src/xmpp/avatar.c @@ -229,7 +229,7 @@ _avatar_request_item_result_handler(xmpp_stanza_t* const stanza, void* const use errno = 0; int res = g_mkdir_with_parents(filename->str, S_IRWXU); if (res == -1) { - char* errmsg = strerror(errno); + const char* errmsg = strerror(errno); if (errmsg) { log_error("Avatar: error creating directory: %s, %s", filename->str, errmsg); } else { |