1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00

Since the string from strerror should never be modified, use const.

This commit is contained in:
Philipp Klaus Krause 2020-10-14 09:52:26 +02:00
parent 72ce934b58
commit 6a276e74e3
6 changed files with 6 additions and 6 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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;

View File

@ -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 {