diff options
author | stig <stig@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-06-28 09:00:11 +0000 |
---|---|---|
committer | stig <stig@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-06-28 09:00:11 +0000 |
commit | bd2648f6d0023b72d8d60eb331c0adede849a6c9 (patch) | |
tree | a97bda6f59cab16eea09e6e4caf2781785378177 /tshark.c | |
parent | 7482c4230f17249aab6a65c73184549b017c06ac (diff) |
Replace all strerror() with g_strerror().
Remove our local strerror implementation.
Mark strerror as locale unsafe API.
This fixes bug 5715.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37812 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tshark.c')
-rw-r--r-- | tshark.c | 26 |
1 files changed, 11 insertions, 15 deletions
@@ -51,10 +51,6 @@ # include <sys/stat.h> #endif -#ifdef NEED_STRERROR_H -#include "wsutil/strerror.h" -#endif - #ifdef HAVE_GETOPT_H #include <getopt.h> #else @@ -1019,21 +1015,21 @@ main(int argc, char *argv[]) if (gpf_path != NULL) { if (gpf_open_errno != 0) { cmdarg_err("Can't open global preferences file \"%s\": %s.", - pf_path, strerror(gpf_open_errno)); + pf_path, g_strerror(gpf_open_errno)); } if (gpf_read_errno != 0) { cmdarg_err("I/O error reading global preferences file \"%s\": %s.", - pf_path, strerror(gpf_read_errno)); + pf_path, g_strerror(gpf_read_errno)); } } if (pf_path != NULL) { if (pf_open_errno != 0) { cmdarg_err("Can't open your preferences file \"%s\": %s.", pf_path, - strerror(pf_open_errno)); + g_strerror(pf_open_errno)); } if (pf_read_errno != 0) { cmdarg_err("I/O error reading your preferences file \"%s\": %s.", - pf_path, strerror(pf_read_errno)); + pf_path, g_strerror(pf_read_errno)); } g_free(pf_path); pf_path = NULL; @@ -1048,11 +1044,11 @@ main(int argc, char *argv[]) if (gdp_path != NULL) { if (gdp_open_errno != 0) { cmdarg_err("Could not open global disabled protocols file\n\"%s\": %s.", - gdp_path, strerror(gdp_open_errno)); + gdp_path, g_strerror(gdp_open_errno)); } if (gdp_read_errno != 0) { cmdarg_err("I/O error reading global disabled protocols file\n\"%s\": %s.", - gdp_path, strerror(gdp_read_errno)); + gdp_path, g_strerror(gdp_read_errno)); } g_free(gdp_path); } @@ -1060,12 +1056,12 @@ main(int argc, char *argv[]) if (dp_open_errno != 0) { cmdarg_err( "Could not open your disabled protocols file\n\"%s\": %s.", dp_path, - strerror(dp_open_errno)); + g_strerror(dp_open_errno)); } if (dp_read_errno != 0) { cmdarg_err( "I/O error reading your disabled protocols file\n\"%s\": %s.", dp_path, - strerror(dp_read_errno)); + g_strerror(dp_read_errno)); } g_free(dp_path); } @@ -3522,7 +3518,7 @@ show_print_file_io_error(int err) default: cmdarg_err("An error occurred while printing packets: %s.", - strerror(err)); + g_strerror(err)); break; } } @@ -3665,7 +3661,7 @@ static void read_failure_message(const char *filename, int err) { cmdarg_err("An error occurred while reading from the file \"%s\": %s.", - filename, strerror(err)); + filename, g_strerror(err)); } /* @@ -3675,7 +3671,7 @@ static void write_failure_message(const char *filename, int err) { cmdarg_err("An error occurred while writing to the file \"%s\": %s.", - filename, strerror(err)); + filename, g_strerror(err)); } /* |