Bug 572977 – Use g_strerror() instead of strerror()

This commit is contained in:
Matthew Barnes
2009-05-02 23:11:12 -04:00
parent 20533c3be5
commit b4d7c0892e
8 changed files with 12 additions and 12 deletions

View File

@ -1063,7 +1063,7 @@ migrate_pilot_data (const char *old_path, const char *new_path)
n = fsync (fd1);
if (n == -1) {
g_warning ("Failed to migrate %s: %s", dent, strerror (errno));
g_warning ("Failed to migrate %s: %s", dent, g_strerror (errno));
g_unlink (filename);
}

View File

@ -689,7 +689,7 @@ migrate_pilot_data (const char *component, const char *conduit, const char *old_
n = fsync (fd1);
if (n == -1) {
g_warning ("Failed to migrate %s: %s", dent, strerror (errno));
g_warning ("Failed to migrate %s: %s", dent, g_strerror (errno));
g_unlink (filename);
}

View File

@ -84,7 +84,7 @@ expire_dir_rec(const char *base, time_t now)
count++;
}
} else if (g_unlink(path->str) == -1) {
d(printf("expiry failed: %s\n", strerror(errno)));
d(printf("expiry failed: %s\n", g_strerror(errno)));
count++;
} else {
d(printf("expired %s\n", path->str));

View File

@ -111,7 +111,7 @@ mail_msg_new (MailMsgInfo *info)
fprintf(log, "%" G_GINT64_MODIFIER "x: lock mail_msg_lock\n", e_util_pthread_id(pthread_self()));
}
} else {
g_warning ("Could not open log file: %s", strerror(errno));
g_warning ("Could not open log file: %s", g_strerror(errno));
log_ops = log_locks = FALSE;
}
}

View File

@ -2091,7 +2091,7 @@ save_messages_exec (struct _save_messages_msg *m)
|| camel_data_wrapper_write_to_stream((CamelDataWrapper *)message, (CamelStream *)filtered_stream) == -1
|| camel_stream_flush((CamelStream *)filtered_stream) == -1) {
camel_exception_setv(&m->base.ex, CAMEL_EXCEPTION_SYSTEM,
_("Error saving messages to: %s:\n %s"), m->path, strerror(errno));
_("Error saving messages to: %s:\n %s"), m->path, g_strerror(errno));
g_free(from);
camel_object_unref((CamelObject *)message);
break;

View File

@ -184,7 +184,7 @@ write_to_ipod (GString *str, char *path, char *filename)
if (f == NULL)
{
critical_error (_("Could not export data!"), strerror (errno));
critical_error (_("Could not export data!"), g_strerror (errno));
}
/* Convert the input string into UTF16 */

View File

@ -141,16 +141,16 @@ pipe_to_sa_full (CamelMimeMessage *msg, const char *in, char **argv, int rv_err,
if (pipe (fds) == -1) {
errnosav = errno;
d(printf ("failed to create a pipe (for use with SpamAssassin: %s\n", strerror (errno)));
g_set_error (error, EM_JUNK_ERROR, errnosav, _("Failed to create pipe: %s"), strerror (errnosav));
d(printf ("failed to create a pipe (for use with SpamAssassin: %s\n", g_strerror (errno)));
g_set_error (error, EM_JUNK_ERROR, errnosav, _("Failed to create pipe: %s"), g_strerror (errnosav));
errno = errnosav;
return rv_err;
}
if (output_buffer && pipe (out_fds) == -1) {
errnosav = errno;
d(printf ("failed to create a pipe (for use with SpamAssassin: %s\n", strerror (errno)));
g_set_error (error, EM_JUNK_ERROR, errnosav, _("Failed to create pipe: %s"), strerror (errnosav));
d(printf ("failed to create a pipe (for use with SpamAssassin: %s\n", g_strerror (errno)));
g_set_error (error, EM_JUNK_ERROR, errnosav, _("Failed to create pipe: %s"), g_strerror (errnosav));
close (fds [0]);
close (fds [1]);
errno = errnosav;
@ -189,7 +189,7 @@ pipe_to_sa_full (CamelMimeMessage *msg, const char *in, char **argv, int rv_err,
close (out_fds [1]);
}
if (errnosav != 0 && errnosav != -1)
g_set_error (error, EM_JUNK_ERROR, errnosav, _("Error after fork: %s"), strerror (errnosav));
g_set_error (error, EM_JUNK_ERROR, errnosav, _("Error after fork: %s"), g_strerror (errnosav));
errno = errnosav;
return rv_err;
}

View File

@ -59,7 +59,7 @@ kill_process (const char *proc_name, KillevComponent *comp)
* found, so just bail completely.
*/
fprintf (stderr, _("Could not execute '%s': %s\n"),
KILL_PROCESS_CMD, strerror (errno));
KILL_PROCESS_CMD, g_strerror (errno));
exit (1);
}