diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2013-04-17 19:39:11 +0000 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2013-04-17 19:39:11 +0000 |
commit | 101489f38612741137811516589c6fe53af43c93 (patch) | |
tree | f829a194c35f7f90bb75ed1c4baab37ae0faf94a | |
parent | f9dce307d8b144c22da8cfaac50023171cfe739c (diff) | |
download | wireshark-101489f38612741137811516589c6fe53af43c93.tar.gz |
Use also const char to uat_save (identical to uat_load)
svn path=/trunk/; revision=48902
-rw-r--r-- | airpcap_loader.c | 5 | ||||
-rw-r--r-- | epan/uat-int.h | 2 | ||||
-rw-r--r-- | epan/uat.c | 2 | ||||
-rw-r--r-- | ui/gtk/uat_gui.c | 4 |
4 files changed, 6 insertions, 7 deletions
diff --git a/airpcap_loader.c b/airpcap_loader.c index 16801e31b3..bca9708011 100644 --- a/airpcap_loader.c +++ b/airpcap_loader.c @@ -250,7 +250,6 @@ set_wep_key(pref_t *pref, gpointer ud _U_) uat_t *uat; gint i; const char* err = NULL; - char* err2 = NULL; uat_wep_key_record_t uat_key; decryption_key_t* new_key; @@ -283,8 +282,8 @@ set_wep_key(pref_t *pref, gpointer ud _U_) uat_add_record(uat, &uat_key); } - uat_save(uat, &err2); - if (err2 != NULL) + uat_save(uat, &err); + if (err != NULL) return 1; } diff --git a/epan/uat-int.h b/epan/uat-int.h index de39e1f499..e079de256a 100644 --- a/epan/uat-int.h +++ b/epan/uat-int.h @@ -91,7 +91,7 @@ WS_DLL_PUBLIC void uat_clear(uat_t*); WS_DLL_PUBLIC -gboolean uat_save(uat_t* , char** ); +gboolean uat_save(uat_t* , const char** ); void uat_load_all(void); diff --git a/epan/uat.c b/epan/uat.c index f1abbb6ccb..87c90b27f1 100644 --- a/epan/uat.c +++ b/epan/uat.c @@ -242,7 +242,7 @@ static void putfld(FILE* fp, void* rec, uat_field_t* f) { } } -gboolean uat_save(uat_t* uat, char** error) { +gboolean uat_save(uat_t* uat, const char** error) { guint i; gchar* fname = uat_get_actual_filename(uat,TRUE); FILE* fp; diff --git a/ui/gtk/uat_gui.c b/ui/gtk/uat_gui.c index 1dddb2f4ab..6a3c91b9a4 100644 --- a/ui/gtk/uat_gui.c +++ b/ui/gtk/uat_gui.c @@ -765,7 +765,7 @@ static void uat_apply_cb(GtkButton *button _U_, gpointer u) { static void uat_ok_cb(GtkButton *button _U_, gpointer u) { uat_t *uat = (uat_t *)u; - gchar *err = NULL; + const gchar *err = NULL; if (uat->changed) { uat_save(uat, &err); @@ -831,7 +831,7 @@ static void remember_selected_row(GtkWidget *w _U_, gpointer u) { static void uat_yessave_cb(GtkWindow *w _U_, void *u) { uat_t *uat = (uat_t *)u; - gchar *err = NULL; + const gchar *err = NULL; window_delete_event_cb(uat->rep->unsaved_window, NULL, NULL); |