diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2005-02-05 11:00:04 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2005-02-05 11:00:04 +0000 |
commit | 9bf11427f4f17464b236490f99b8394e9ee5a169 (patch) | |
tree | 6ce8669d137335ddebe8d8cb563760003eeeaf6d | |
parent | 611508684e0fc67965ed8082c5f580f22f4271f1 (diff) | |
download | wireshark-9bf11427f4f17464b236490f99b8394e9ee5a169.tar.gz wireshark-9bf11427f4f17464b236490f99b8394e9ee5a169.tar.bz2 wireshark-9bf11427f4f17464b236490f99b8394e9ee5a169.zip |
make some string parameters const, as they are not changed inside
svn path=/trunk/; revision=13298
-rw-r--r-- | file.c | 12 | ||||
-rw-r--r-- | file.h | 8 |
2 files changed, 10 insertions, 10 deletions
@@ -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]; @@ -56,7 +56,7 @@ typedef enum { * @param is_tempfile is this a temporary file? * @return TRUE on success, FALSE on failure */ -gboolean cf_open(capture_file *cf, char *fname, gboolean is_tempfile, int *err); +gboolean cf_open(capture_file *cf, const char *fname, gboolean is_tempfile, int *err); /** * Close a capture file. @@ -90,7 +90,7 @@ cf_read_status_t cf_read(capture_file *cf); * @param err the error code, if an error had occured * @return TRUE on success, FALSE on failure */ -gboolean cf_start_tail(capture_file *cf, char *fname, gboolean is_tempfile, int *err); +gboolean cf_start_tail(capture_file *cf, const char *fname, gboolean is_tempfile, int *err); /** * Read packets from the "end" of a capture file. @@ -120,7 +120,7 @@ cf_read_status_t cf_finish_tail(capture_file *cf, int *err); * @param save_format the format of the file to save (libpcap, ...) * @return TRUE on success, FALSE on failure */ -gboolean cf_save(capture_file * cf, char *fname, packet_range_t *range, guint save_format); +gboolean cf_save(capture_file * cf, const char *fname, packet_range_t *range, guint save_format); /** * Get a displayable name of the capture file. @@ -380,7 +380,7 @@ void cf_unmark_frame(capture_file *cf, frame_data *frame); * @param err_info the additional info about this error (e.g. filename) * @return statically allocated error message */ -char *cf_read_error_message(int err, gchar *err_info); +char *cf_read_error_message(int err, const gchar *err_info); /** * Merge two (or more) capture files into one. |