diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-12-31 00:26:36 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-12-31 00:26:36 +0000 |
commit | 0bf02e178e873c8b9c346021f6cb4df1b00f0cf0 (patch) | |
tree | 738949b79c0a12c924ec7155b79a0aa9ebfc032f /gtk/rpc_stat.c | |
parent | f97aa62fd104b6e6e053183fdb9ca5fe936f0a1c (diff) |
"gtk_entry_get_text()" returns a "const char *" - assign the result to
one.
"get_basename()" doesn't modify its argument, and its callers don't
modify the substring pointed to by the result, so make it take a "const
char *" as an argument and return a "const char *".
"find_last_pathname_separator()" doesn't modify its argument, so make it
a "const char *" - but some of its callers pass a non-"const" "char *"
and modify the result, so don't make its return value a "const char *".
And, as none of its callers are outside "filesystem.c", make it static.
In "about_folders_page_new()", have separate variables for pathnames
returned as "const char *" (which are cached by the routine that returns
them, so you can't modify them - and can't free them, so get rid of the
commented-out "g_free()" calls for them) and pathnames returned as "char
*" (which are allocated anew for each call, and can be modified, but
have to be freed).
Clean up white space.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12881 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'gtk/rpc_stat.c')
-rw-r--r-- | gtk/rpc_stat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/rpc_stat.c b/gtk/rpc_stat.c index 31f58edd23..004f3a3cd9 100644 --- a/gtk/rpc_stat.c +++ b/gtk/rpc_stat.c @@ -316,11 +316,11 @@ static void rpcstat_start_button_clicked(GtkWidget *item _U_, gpointer data _U_) { GString *str; - char *filter; + const char *filter; str = g_string_new("rpc,srt"); g_string_sprintfa(str, ",%d,%d", rpc_program, rpc_version); - filter=(char *)gtk_entry_get_text(GTK_ENTRY(filter_entry)); + filter=gtk_entry_get_text(GTK_ENTRY(filter_entry)); if(filter[0]!=0){ g_string_sprintfa(str, ",%s", filter); } |