aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2005-02-05 11:00:04 +0000
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2005-02-05 11:00:04 +0000
commit802c39053d005695be73044a067b2c263692d3c6 (patch)
tree6ce8669d137335ddebe8d8cb563760003eeeaf6d /file.c
parent10e13304190d4a43f19840eb3521ddaf433055cb (diff)
make some string parameters const, as they are not changed inside
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13298 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'file.c')
-rw-r--r--file.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/file.c b/file.c
index 9f59a1e6eb..1e75cc6025 100644
--- a/file.c
+++ b/file.c
@@ -132,7 +132,7 @@ static void cf_open_failure_alert_box(const char *filename, int err,
static char *file_rename_error_message(int err);
static void cf_write_failure_alert_box(const char *filename, int err);
static void cf_close_failure_alert_box(const char *filename, int err);
-static gboolean copy_binary_file(char *from_filename, char *to_filename);
+static gboolean copy_binary_file(const char *from_filename, const char *to_filename);
/* Update the progress bar this many times when reading a file. */
#define N_PROGBAR_UPDATES 100
@@ -143,7 +143,7 @@ static gboolean copy_binary_file(char *from_filename, char *to_filename);
gboolean
-cf_open(capture_file *cf, char *fname, gboolean is_tempfile, int *err)
+cf_open(capture_file *cf, const char *fname, gboolean is_tempfile, int *err)
{
wtap *wth;
gchar *err_info;
@@ -530,7 +530,7 @@ cf_read(capture_file *cf)
#ifdef HAVE_LIBPCAP
gboolean
-cf_start_tail(capture_file *cf, char *fname, gboolean is_tempfile, int *err)
+cf_start_tail(capture_file *cf, const char *fname, gboolean is_tempfile, int *err)
{
gchar *capture_msg;
gboolean status;
@@ -3085,7 +3085,7 @@ save_packet(capture_file *cf _U_, frame_data *fdata,
}
gboolean
-cf_save(capture_file *cf, char *fname, packet_range_t *range, guint save_format)
+cf_save(capture_file *cf, const char *fname, packet_range_t *range, guint save_format)
{
gchar *from_filename;
const gchar *name_ptr;
@@ -3429,7 +3429,7 @@ file_rename_error_message(int err)
}
char *
-cf_read_error_message(int err, gchar *err_info)
+cf_read_error_message(int err, const gchar *err_info)
{
static char errmsg_errno[1024+1];
@@ -3564,7 +3564,7 @@ cf_reload(capture_file *cf) {
* displays a simple dialog window with the error message.
*/
static gboolean
-copy_binary_file(char *from_filename, char *to_filename)
+copy_binary_file(const char *from_filename, const char *to_filename)
{
int from_fd, to_fd, nread, nwritten, err;
guint8 pd[65536];