diff --git a/capture/capture_sync.c b/capture/capture_sync.c index 3cb467c6ff..09cdb17c3b 100644 --- a/capture/capture_sync.c +++ b/capture/capture_sync.c @@ -188,7 +188,7 @@ void capture_process_finished(capture_session *cap_session) } cap_session->closed(cap_session, message->str); - g_string_free(message, true); + g_string_free(message, TRUE); g_free(capture_opts->closed_msg); capture_opts->closed_msg = NULL; capture_opts->stop_after_extcaps = false; @@ -348,7 +348,7 @@ sync_pipe_open_command(char **argv, int *data_read_fd, /* We can't return anything */ g_strfreev(argv); #ifdef _WIN32 - g_string_free(args, true); + g_string_free(args, TRUE); #endif return -1; } @@ -543,7 +543,7 @@ sync_pipe_open_command(char **argv, int *data_read_fd, ws_close(message_read_fd); /* Should close sync_pipe[PIPE_READ] */ CloseHandle(sync_pipe[PIPE_WRITE]); g_strfreev(argv); - g_string_free(args, true); + g_string_free(args, TRUE); g_free(handles); return -1; } @@ -551,7 +551,7 @@ sync_pipe_open_command(char **argv, int *data_read_fd, /* We may need to store this and close it later */ CloseHandle(pi.hThread); g_strfreev(argv); - g_string_free(args, true); + g_string_free(args, TRUE); g_free(handles); if (signal_write_fd != NULL) { @@ -1202,7 +1202,7 @@ sync_pipe_run_command_actual(char **argv, char **data, char **primary_msg, */ *primary_msg = msg; *secondary_msg = NULL; - g_string_free(data_buf, true); + g_string_free(data_buf, TRUE); *data = NULL; } else { /* @@ -1210,7 +1210,7 @@ sync_pipe_run_command_actual(char **argv, char **data, char **primary_msg, */ *primary_msg = NULL; *secondary_msg = NULL; - *data = g_string_free(data_buf, false); + *data = g_string_free(data_buf, FALSE); } break; diff --git a/epan/conversation.c b/epan/conversation.c index 3875502ad0..242e1a7a41 100644 --- a/epan/conversation.c +++ b/epan/conversation.c @@ -255,7 +255,7 @@ static char* conversation_element_list_values(conversation_element_t *elements) break; } } - return g_string_free(value_str, false); + return g_string_free(value_str, FALSE); } #endif diff --git a/epan/conversation_table.c b/epan/conversation_table.c index e46cef1ee0..0b5a2f9dec 100644 --- a/epan/conversation_table.c +++ b/epan/conversation_table.c @@ -74,7 +74,7 @@ dissector_conversation_init(const char *opt_arg, void* userdata) filter = opt_arg + cmd_str->len + 1; } } - g_string_free(cmd_str, true); + g_string_free(cmd_str, TRUE); if (table->conv_gui_init) table->conv_gui_init(table, filter); @@ -96,7 +96,7 @@ dissector_endpoint_init(const char *opt_arg, void* userdata) filter=NULL; } - g_string_free(cmd_str, true); + g_string_free(cmd_str, TRUE); if (table->endpoint_gui_init) table->endpoint_gui_init(table, filter); @@ -152,7 +152,7 @@ set_conv_gui_data(const void *key _U_, void *value, void *userdata) g_string_append(conv_cmd_str, proto_get_protocol_filter_name(table->proto_id)); ui_info.group = REGISTER_STAT_GROUP_CONVERSATION_LIST; ui_info.title = NULL; /* construct this from the protocol info? */ - ui_info.cli_string = g_string_free(conv_cmd_str, false); + ui_info.cli_string = g_string_free(conv_cmd_str, FALSE); ui_info.tap_init_cb = dissector_conversation_init; ui_info.nparams = 0; ui_info.params = NULL; diff --git a/epan/crypt/dot11decrypt.c b/epan/crypt/dot11decrypt.c index 2d96eb5659..9c4efc8017 100644 --- a/epan/crypt/dot11decrypt.c +++ b/epan/crypt/dot11decrypt.c @@ -2950,7 +2950,7 @@ parse_key_string(char* input_string, uint8_t key_type, char** error) g_string_append_printf(err_string, "%u, ", allowed_key_lengths[i]); } g_string_append_printf(err_string, "or %u bytes.", allowed_key_lengths[i]); - *error = g_string_free(err_string, false); + *error = g_string_free(err_string, FALSE); } g_byte_array_free(key_ba, true); return NULL; diff --git a/epan/dfilter/dfilter-macro.c b/epan/dfilter/dfilter-macro.c index 78b57db4a3..920e1fb251 100644 --- a/epan/dfilter/dfilter-macro.c +++ b/epan/dfilter/dfilter-macro.c @@ -79,7 +79,7 @@ static char* dfilter_macro_resolve(char* name, char** args, df_error_t** error) ret = wmem_strdup(NULL, text->str); - g_string_free(text,true); + g_string_free(text,TRUE); return ret; } @@ -154,7 +154,7 @@ static char* dfilter_macro_apply_recurse(const char* text, unsigned depth, df_er return NULL; } -#define FGS(n) if (n) g_string_free(n,true); n = NULL +#define FGS(n) if (n) g_string_free(n,TRUE); n = NULL #define FREE_ALL() \ do { \ @@ -309,7 +309,7 @@ static char* dfilter_macro_apply_recurse(const char* text, unsigned depth, df_er *error = df_error_new_msg("null argument in macro expression"); goto on_error; } - g_ptr_array_add(args,g_string_free(arg,false)); + g_ptr_array_add(args,g_string_free(arg,FALSE)); arg = g_string_sized_new(32); break; @@ -340,7 +340,7 @@ static char* dfilter_macro_apply_recurse(const char* text, unsigned depth, df_er goto on_error; } } else { - g_ptr_array_add(args,g_string_free(arg,false)); + g_ptr_array_add(args,g_string_free(arg,FALSE)); g_ptr_array_add(args,NULL); arg = NULL; } @@ -377,11 +377,11 @@ finish: if (changed) { resolved = dfilter_macro_apply_recurse(out->str, depth + 1, error); - g_string_free(out,true); + g_string_free(out,TRUE); return resolved; } else { char* out_str = wmem_strdup(NULL, out->str); - g_string_free(out,true); + g_string_free(out,TRUE); return out_str; } } @@ -392,7 +392,7 @@ on_error: if (*error == NULL) *error = df_error_new_msg("unknown error in macro expression"); } - g_string_free(out,true); + g_string_free(out,TRUE); return NULL; } } diff --git a/epan/dfilter/dfilter.c b/epan/dfilter/dfilter.c index 04775bbfe3..bead5da88b 100644 --- a/epan/dfilter/dfilter.c +++ b/epan/dfilter/dfilter.c @@ -235,7 +235,7 @@ dfsyntax_free(dfsyntax_t *dfs) stnode_free(dfs->lval); if (dfs->quoted_string) - g_string_free(dfs->quoted_string, true); + g_string_free(dfs->quoted_string, TRUE); diff --git a/epan/dfilter/dfvm.c b/epan/dfilter/dfvm.c index a6077fca55..8a42132568 100644 --- a/epan/dfilter/dfvm.c +++ b/epan/dfilter/dfvm.c @@ -359,7 +359,7 @@ append_call_function(wmem_strbuf_t *buf, const char *func, const char *func_type sep = ", "; } wmem_strbuf_append(buf, gs->str); - g_string_free(gs, true); + g_string_free(gs, TRUE); } wmem_strbuf_append_printf(buf, ")%s", func_type); } diff --git a/epan/dfilter/drange.c b/epan/dfilter/drange.c index e0aada4831..241c7f4cb0 100644 --- a/epan/dfilter/drange.c +++ b/epan/dfilter/drange.c @@ -389,7 +389,7 @@ drange_tostr(const drange_t *dr) } } - return g_string_free(repr, false); + return g_string_free(repr, FALSE); } /* diff --git a/epan/dfilter/scanner.l b/epan/dfilter/scanner.l index 5d561fbfaf..145a858e95 100644 --- a/epan/dfilter/scanner.l +++ b/epan/dfilter/scanner.l @@ -284,7 +284,7 @@ HexExponent ([pP][+-]?[[:digit:]]+) <> { /* unterminated string */ update_string_loc(yyextra, yytext); - g_string_free(yyextra->quoted_string, true); + g_string_free(yyextra->quoted_string, TRUE); yyextra->quoted_string = NULL; FAIL("The final quote was missing from a quoted string."); return SCAN_FAILED; @@ -310,7 +310,7 @@ HexExponent ([pP][+-]?[[:digit:]]+) unsigned long result; result = strtoul(yytext + 1, NULL, 8); if (result > 0xff) { - g_string_free(yyextra->quoted_string, true); + g_string_free(yyextra->quoted_string, TRUE); yyextra->quoted_string = NULL; FAIL("%s is larger than 255.", yytext); return SCAN_FAILED; @@ -343,7 +343,7 @@ HexExponent ([pP][+-]?[[:digit:]]+) g_string_append(yyextra->quoted_string, yytext); } else if (!append_universal_character_name(yyextra, yyextra->quoted_string, yytext)) { - g_string_free(yyextra->quoted_string, true); + g_string_free(yyextra->quoted_string, TRUE); yyextra->quoted_string = NULL; return SCAN_FAILED; } @@ -356,7 +356,7 @@ HexExponent ([pP][+-]?[[:digit:]]+) g_string_append(yyextra->quoted_string, yytext); } else if (!append_universal_character_name(yyextra, yyextra->quoted_string, yytext)) { - g_string_free(yyextra->quoted_string, true); + g_string_free(yyextra->quoted_string, TRUE); yyextra->quoted_string = NULL; return SCAN_FAILED; } @@ -370,7 +370,7 @@ HexExponent ([pP][+-]?[[:digit:]]+) g_string_append(yyextra->quoted_string, yytext); } else if (!append_escaped_char(yyextra, yyextra->quoted_string, yytext[1])) { - g_string_free(yyextra->quoted_string, true); + g_string_free(yyextra->quoted_string, TRUE); yyextra->quoted_string = NULL; return SCAN_FAILED; } @@ -395,7 +395,7 @@ HexExponent ([pP][+-]?[[:digit:]]+) <> { /* unterminated character value */ update_string_loc(yyextra, yytext); - g_string_free(yyextra->quoted_string, true); + g_string_free(yyextra->quoted_string, TRUE); yyextra->quoted_string = NULL; FAIL("The final quote was missing from a character constant."); return SCAN_FAILED; @@ -655,7 +655,7 @@ set_lval_charconst(dfsyntax_t *dfs, GString *quoted_string) unsigned long number; bool ok; - char *token_value = g_string_free(quoted_string, false); + char *token_value = g_string_free(quoted_string, FALSE); ok = parse_charconst(dfs, token_value, &number); if (!ok) { g_free(token_value); diff --git a/epan/dfilter/sttype-function.c b/epan/dfilter/sttype-function.c index b93ad4be2b..661008777d 100644 --- a/epan/dfilter/sttype-function.c +++ b/epan/dfilter/sttype-function.c @@ -76,7 +76,7 @@ function_tostr(const void *data, bool pretty) g_string_printf(repr, "%s#%u", def->name, g_slist_length(params)); } - return g_string_free(repr, false); + return g_string_free(repr, FALSE); } static void diff --git a/epan/dfilter/sttype-set.c b/epan/dfilter/sttype-set.c index 31cc7b58b5..a1b901d241 100644 --- a/epan/dfilter/sttype-set.c +++ b/epan/dfilter/sttype-set.c @@ -67,7 +67,7 @@ sttype_set_tostr(const void *data, bool pretty) } } - return g_string_free(repr, false); + return g_string_free(repr, FALSE); } void diff --git a/epan/dfilter/sttype-string.c b/epan/dfilter/sttype-string.c index edf7263f5e..d3f3fc0641 100644 --- a/epan/dfilter/sttype-string.c +++ b/epan/dfilter/sttype-string.c @@ -38,7 +38,7 @@ gstring_dup(const void *value) static void gstring_free(void *value) { - g_string_free(value, true); + g_string_free(value, TRUE); } static char * diff --git a/epan/export_object.c b/epan/export_object.c index cf12bd847a..f65603f2a5 100644 --- a/epan/export_object.c +++ b/epan/export_object.c @@ -103,10 +103,10 @@ static GString *eo_rename(GString *gstr, size_t maxlen, int dupn) } if (ext_str) { - g_string_free(ext_str, true); + g_string_free(ext_str, TRUE); } - g_string_free(gstr_tmp, true); + g_string_free(gstr_tmp, TRUE); return gstr; } diff --git a/epan/follow.c b/epan/follow.c index ba92c2af66..5d9a75d8c7 100644 --- a/epan/follow.c +++ b/epan/follow.c @@ -140,7 +140,7 @@ char* follow_get_stat_tap_string(register_follow_t* follower) { GString *cmd_str = g_string_new("follow,"); g_string_append(cmd_str, proto_get_protocol_filter_name(follower->proto_id)); - return g_string_free(cmd_str, false); + return g_string_free(cmd_str, FALSE); } /* here we are going to try and reconstruct the data portion of a TCP diff --git a/epan/maxmind_db.c b/epan/maxmind_db.c index 5a304df202..6031276a07 100644 --- a/epan/maxmind_db.c +++ b/epan/maxmind_db.c @@ -356,10 +356,10 @@ read_mmdbr_stdout_worker(void *data _U_) { } } - g_string_free(country_iso, true); - g_string_free(country, true); - g_string_free(city, true); - g_string_free(as_org, true); + g_string_free(country_iso, TRUE); + g_string_free(country, TRUE); + g_string_free(city, TRUE); + g_string_free(as_org, TRUE); g_free(line_buf); g_free(response); return NULL; @@ -810,7 +810,7 @@ maxmind_db_get_paths(void) { g_string_truncate(path_str, path_str->len-1); - return g_string_free(path_str, false); + return g_string_free(path_str, FALSE); } void diff --git a/epan/oids.c b/epan/oids.c index b15087369a..b999057da6 100644 --- a/epan/oids.c +++ b/epan/oids.c @@ -596,7 +596,7 @@ static void register_mibs(void) { } g_free(path_str); - g_string_free(smi_errors,true); + g_string_free(smi_errors,TRUE); for (smiModule = smiGetFirstModule(); smiModule; @@ -1286,7 +1286,7 @@ oid_get_default_mib_path(void) { if (!load_smi_modules) { D(1,("OID resolution not enabled")); - return g_string_free(path_str, false); + return g_string_free(path_str, FALSE); } #ifdef _WIN32 path = get_datafile_path("snmp\\mibs"); @@ -1319,7 +1319,7 @@ oid_get_default_mib_path(void) { #ifndef _WIN32 } #endif - return g_string_free(path_str, false); + return g_string_free(path_str, FALSE); #else /* HAVE_LIBSMI */ return g_strdup(""); #endif diff --git a/epan/prefs.c b/epan/prefs.c index 2b37c9e759..dba9d01d9c 100644 --- a/epan/prefs.c +++ b/epan/prefs.c @@ -2612,7 +2612,7 @@ column_hidden_to_str_cb(pref_t* pref, bool default_val) cidx++; } - return g_string_free (cols_hidden, false); + return g_string_free (cols_hidden, FALSE); } static bool @@ -2698,7 +2698,7 @@ column_hidden_fmt_to_str_cb(pref_t* pref, bool default_val) clp = clp->next; } - return g_string_free (cols_hidden, false); + return g_string_free (cols_hidden, FALSE); } static bool @@ -4067,14 +4067,14 @@ prefs_get_string_list(const char *str) if (state == IN_QUOT || backslash) { /* We were in the middle of a quoted string or backslash escape, and ran out of characters; that's an error. */ - g_string_free(slstr, true); + g_string_free(slstr, TRUE); prefs_clear_string_list(sl); return NULL; } if (slstr->len > 0) - sl = g_list_append(sl, g_string_free(slstr, false)); + sl = g_list_append(sl, g_string_free(slstr, FALSE)); else - g_string_free(slstr, true); + g_string_free(slstr, TRUE); break; } if (cur_c == '"' && !backslash) { @@ -4110,7 +4110,7 @@ prefs_get_string_list(const char *str) and it wasn't preceded by a backslash; it's the end of the string we were working on... */ if (slstr->len > 0) { - sl = g_list_append(sl, g_string_free(slstr, false)); + sl = g_list_append(sl, g_string_free(slstr, FALSE)); slstr = g_string_sized_new(default_size); } @@ -4170,7 +4170,7 @@ char *join_string_list(GList *sl) cur = cur->next; } - return g_string_free(joined_str, false); + return g_string_free(joined_str, FALSE); } void @@ -4993,8 +4993,8 @@ read_prefs_file(const char *pf_path, FILE *pf, } } - g_string_free(cur_val, true); - g_string_free(cur_var, true); + g_string_free(cur_val, TRUE); + g_string_free(cur_var, TRUE); if (ferror(pf)) return errno; @@ -6685,7 +6685,7 @@ prefs_pref_type_description(pref_t *pref) g_string_append(enum_str, ", "); } g_string_append(enum_str, "\n(case-insensitive)."); - return g_string_free(enum_str, false); + return g_string_free(enum_str, FALSE); } case PREF_STRING: diff --git a/epan/proto.c b/epan/proto.c index 62f711b409..2fe6055976 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -1084,7 +1084,7 @@ proto_registrar_get_byalias(const char *alias_name) } header_field_info *hfinfo = proto_registrar_get_byname(filter_name->str); g_free(an_copy); - g_string_free(filter_name, true); + g_string_free(filter_name, TRUE); return hfinfo; } diff --git a/epan/radius_dict.l b/epan/radius_dict.l index 85e33def15..ace156e40a 100644 --- a/epan/radius_dict.l +++ b/epan/radius_dict.l @@ -822,7 +822,7 @@ bool radius_load_dictionary (radius_dictionary_t* d, char* dir, const char* file if (!in) { g_string_append_printf(state.error, "Could not open file: '%s', error: %s\n", state.fullpaths[0], g_strerror(errno)); g_free(state.fullpaths[0]); - *err_str = g_string_free(state.error,false); + *err_str = g_string_free(state.error,FALSE); return false; } @@ -833,7 +833,7 @@ bool radius_load_dictionary (radius_dictionary_t* d, char* dir, const char* file strerror(errno)); fclose(in); g_free(state.fullpaths[0]); - *err_str = g_string_free(state.error,false); + *err_str = g_string_free(state.error,FALSE); return false; } @@ -860,11 +860,11 @@ bool radius_load_dictionary (radius_dictionary_t* d, char* dir, const char* file g_hash_table_destroy(state.value_strings); if (state.error->len > 0) { - *err_str = g_string_free(state.error,false); + *err_str = g_string_free(state.error,FALSE); return false; } else { *err_str = NULL; - g_string_free(state.error,true); + g_string_free(state.error,TRUE); return true; } } diff --git a/epan/rtd_table.c b/epan/rtd_table.c index 9e3ce1cbc5..2adf6ae91d 100644 --- a/epan/rtd_table.c +++ b/epan/rtd_table.c @@ -112,7 +112,7 @@ char* rtd_table_get_tap_string(register_rtd_t* rtd) { GString *cmd_str = g_string_new(proto_get_protocol_filter_name(rtd->proto_id)); g_string_append(cmd_str, ",rtd"); - return g_string_free(cmd_str, false); + return g_string_free(cmd_str, FALSE); } void rtd_table_get_filter(register_rtd_t* rtd, const char *opt_arg, const char **filter, char** err) diff --git a/epan/secrets.c b/epan/secrets.c index afc659071b..935d184a69 100644 --- a/epan/secrets.c +++ b/epan/secrets.c @@ -388,7 +388,7 @@ uat_pkcs11_libs_load_all(void) } if (err) { report_failure("%s", err->str); - g_string_free(err, true); + g_string_free(err, TRUE); } } @@ -519,7 +519,7 @@ uat_rsa_privkeys_post_update(void) } if (errors) { report_failure("%s", errors->str); - g_string_free(errors, true); + g_string_free(errors, TRUE); } } diff --git a/epan/sequence_analysis.c b/epan/sequence_analysis.c index d155f189ef..b023babeba 100644 --- a/epan/sequence_analysis.c +++ b/epan/sequence_analysis.c @@ -627,11 +627,11 @@ sequence_analysis_dump_to_file(FILE *of, seq_analysis_info_t *sainfo, unsigned fprintf(of, "%s\n", tmp_str->str); } - g_string_free(label_string, true); - g_string_free(empty_line, true); - g_string_free(separator_line, true); - g_string_free(tmp_str, true); - g_string_free(tmp_str2, true); + g_string_free(label_string, TRUE); + g_string_free(empty_line, TRUE); + g_string_free(separator_line, TRUE); + g_string_free(tmp_str, TRUE); + g_string_free(tmp_str2, TRUE); } /* diff --git a/epan/srt_table.c b/epan/srt_table.c index 70bf5d429f..2c0c083aa0 100644 --- a/epan/srt_table.c +++ b/epan/srt_table.c @@ -130,7 +130,7 @@ char* srt_table_get_tap_string(register_srt_t* srt) { GString *cmd_str = g_string_new(proto_get_protocol_filter_name(srt->proto_id)); g_string_append(cmd_str, ",srt"); - return g_string_free(cmd_str, false); + return g_string_free(cmd_str, FALSE); } void srt_table_get_filter(register_srt_t* srt, const char *opt_arg, const char **filter, char** err) diff --git a/epan/stats_tree.c b/epan/stats_tree.c index fce2d55e11..f6a4a0b016 100644 --- a/epan/stats_tree.c +++ b/epan/stats_tree.c @@ -297,7 +297,7 @@ stats_tree_register(const char *tapname, const char *abbr, const char *path, sep = " / "; } g_strfreev(split); - cfg->title = g_string_free(title_str, false); + cfg->title = g_string_free(title_str, FALSE); cfg->packet = packet; cfg->init = init; diff --git a/epan/strutil.c b/epan/strutil.c index b09bcbf2b5..08c52afbde 100644 --- a/epan/strutil.c +++ b/epan/strutil.c @@ -609,7 +609,7 @@ xml_escape(const char *unescaped) /* Return the string value contained within the GString * after getting rid of the GString structure. * This is the way to do this, see the GLib reference. */ - return g_string_free(buffer, false); + return g_string_free(buffer, FALSE); } /* diff --git a/epan/uat.c b/epan/uat.c index 9ff0a9c9be..8ff2c525ad 100644 --- a/epan/uat.c +++ b/epan/uat.c @@ -311,7 +311,7 @@ char *uat_fld_tostr(void *rec, uat_field_t *f) { for (i=0; istr, wslua_gui_print_data_ptr); } - g_string_free(gstr, true); + g_string_free(gstr, TRUE); return 0; } diff --git a/epan/wslua/wslua_dissector.c b/epan/wslua/wslua_dissector.c index ce92d3e0c8..9256985a26 100644 --- a/epan/wslua/wslua_dissector.c +++ b/epan/wslua/wslua_dissector.c @@ -811,7 +811,7 @@ WSLUA_METAMETHOD DissectorTable__tostring(lua_State* L) { } lua_pushstring(L,s->str); - g_string_free(s,true); + g_string_free(s,TRUE); WSLUA_RETURN(1); /* A string of debug information about the <>. */ } diff --git a/epan/wslua/wslua_field.c b/epan/wslua/wslua_field.c index 26ee9a45a4..72ef6f0b29 100644 --- a/epan/wslua/wslua_field.c +++ b/epan/wslua/wslua_field.c @@ -565,13 +565,13 @@ void lua_prime_all_fields(proto_tree* tree _U_) { if (error) { report_failure("while registering lua_fake_tap:\n%s",error->str); - g_string_free(error,true); + g_string_free(error,TRUE); } else if (!dfilter_compile(fake_tap_filter->str, &wslua_dfilter, &df_err)) { report_failure("while compiling dfilter \"%s\" for wslua: %s", fake_tap_filter->str, df_err->msg); df_error_free(&df_err); } } - g_string_free(fake_tap_filter, true); + g_string_free(fake_tap_filter, TRUE); } WSLUA_CONSTRUCTOR Field_new(lua_State *L) { diff --git a/epan/wslua/wslua_gui.c b/epan/wslua/wslua_gui.c index 6135cc615f..469c245a48 100644 --- a/epan/wslua/wslua_gui.c +++ b/epan/wslua/wslua_gui.c @@ -1029,7 +1029,7 @@ WSLUA_FUNCTION wslua_copy_to_clipboard(lua_State* L) { /* Copy a string into the ops->copy_to_clipboard(gstr); - g_string_free(gstr,true); + g_string_free(gstr,TRUE); return 0; } diff --git a/epan/wslua/wslua_listener.c b/epan/wslua/wslua_listener.c index 960b561ee8..156ff690b7 100644 --- a/epan/wslua/wslua_listener.c +++ b/epan/wslua/wslua_listener.c @@ -253,7 +253,7 @@ WSLUA_CONSTRUCTOR Listener_new(lua_State* L) { g_free(tap); /* WSLUA_ERROR(new_tap,"tap registration error"); */ lua_pushfstring(L,"Error while registering tap:\n%s",error->str); - g_string_free(error,true); + g_string_free(error,TRUE); return luaL_error(L,lua_tostring(L,-1)); } diff --git a/epan/wslua/wslua_pinfo.c b/epan/wslua/wslua_pinfo.c index 4e0a698873..301adb99b7 100644 --- a/epan/wslua/wslua_pinfo.c +++ b/epan/wslua/wslua_pinfo.c @@ -74,7 +74,7 @@ WSLUA_METAMETHOD PrivateTable__tostring(lua_State* L) { lua_pushstring(L,key_string->str); - g_string_free (key_string, true); + g_string_free (key_string, TRUE); g_list_free (keys); WSLUA_RETURN(1); /* A string with all keys in the table, mostly for debugging. */ diff --git a/extcap/ciscodump.c b/extcap/ciscodump.c index 84b29d3be4..e01669ccb9 100644 --- a/extcap/ciscodump.c +++ b/extcap/ciscodump.c @@ -162,7 +162,7 @@ static char* interfaces_list_to_filter(GSList* interfaces, unsigned int remote_p g_string_append_printf(filter, ", permit ip any any"); } - return g_string_free(filter, false); + return g_string_free(filter, FALSE); } static char* local_interfaces_to_filter(const unsigned int remote_port) diff --git a/extcap/extcap-base.c b/extcap/extcap-base.c index e8c2bf5119..f30f2f1306 100644 --- a/extcap/extcap-base.c +++ b/extcap/extcap-base.c @@ -408,7 +408,7 @@ void extcap_cmdline_debug(char** ar, const unsigned n) for (i = 0; i < n; i++) g_string_append_printf(cmdline, "%s ", ar[i]); ws_debug("%s", cmdline->str); - g_string_free(cmdline, true); + g_string_free(cmdline, TRUE); } /* diff --git a/extcap/falcodump.cpp b/extcap/falcodump.cpp index bc769e1149..b07e44b66c 100644 --- a/extcap/falcodump.cpp +++ b/extcap/falcodump.cpp @@ -125,7 +125,7 @@ struct plugin_configuration { json_dumper_finish(&dumper); std::string config_blob = dumper.output_string->str; ws_debug("configuration: %s", dumper.output_string->str); - g_string_free(dumper.output_string, true); + g_string_free(dumper.output_string, TRUE); return config_blob; } }; diff --git a/extcap/sshdump.c b/extcap/sshdump.c index 51c0bfc2f8..3202072a96 100644 --- a/extcap/sshdump.c +++ b/extcap/sshdump.c @@ -196,7 +196,7 @@ static ssh_channel run_ssh_command(ssh_session sshs, const char* capture_command g_string_append_printf(ifaces_string, "-i %s ", quoted_iface); ifaces_array_num++; } - ifaces = g_string_free(ifaces_string, false); + ifaces = g_string_free(ifaces_string, FALSE); } quoted_filter = g_shell_quote(cfilter ? cfilter : ""); if (count > 0) @@ -306,7 +306,7 @@ static char* interfaces_list_to_filter(GSList* interfaces, unsigned int remote_p } g_string_append_printf(filter, ") and port %u)", remote_port); } - return g_string_free(filter, false); + return g_string_free(filter, FALSE); } static int list_config(char *interface, unsigned int remote_port) diff --git a/fileset.c b/fileset.c index 2bda98ac35..2a0b252bc3 100644 --- a/fileset.c +++ b/fileset.c @@ -349,7 +349,7 @@ fileset_add_dir(const char *fname, void *window) /* don't add the file to the dialog here, this will be done in fileset_update_dlg() below */ } - g_string_free(dirname, true /* free_segment */); + g_string_free(dirname, TRUE /* free_segment */); /* sort entries by creation time */ set.entries = g_list_sort(set.entries, fileset_sort_compare); diff --git a/plugins/epan/mate/mate_grammar.lemon b/plugins/epan/mate/mate_grammar.lemon index b08f482d3f..fef0ac27e7 100644 --- a/plugins/epan/mate/mate_grammar.lemon +++ b/plugins/epan/mate/mate_grammar.lemon @@ -165,7 +165,7 @@ static char* recolonize(mate_config* mc, char* s) { r = str->str; - g_string_free(str,false); + g_string_free(str,FALSE); return r; } diff --git a/plugins/epan/mate/mate_util.c b/plugins/epan/mate/mate_util.c index 70bcb06011..dcfe36c0dd 100644 --- a/plugins/epan/mate/mate_util.c +++ b/plugins/epan/mate/mate_util.c @@ -752,7 +752,7 @@ char* avpl_to_str(AVPL* avpl) { g_free(avp_s); } - r = g_string_free(s,false); + r = g_string_free(s,FALSE); /* g_strchug(r); ? */ return r; @@ -770,7 +770,7 @@ extern char* avpl_to_dotstr(AVPL* avpl) { g_free(avp_s); } - r = g_string_free(s,false); + r = g_string_free(s,FALSE); /* g_strchug(r); ? */ return r; diff --git a/plugins/epan/wimaxasncp/wimaxasncp_dict.l b/plugins/epan/wimaxasncp/wimaxasncp_dict.l index 306eb5caf2..ca8cf99dc3 100644 --- a/plugins/epan/wimaxasncp/wimaxasncp_dict.l +++ b/plugins/epan/wimaxasncp/wimaxasncp_dict.l @@ -766,12 +766,12 @@ wimaxasncp_dict_t *wimaxasncp_dict_scan( if (state.dict_error->len > 0) { - *error = g_string_free(state.dict_error, false); + *error = g_string_free(state.dict_error, FALSE); } else { *error = NULL; - g_string_free(state.dict_error, true); + g_string_free(state.dict_error, TRUE); } return state.dict; } diff --git a/ui/capture.c b/ui/capture.c index d99c60da02..3f81da2bcf 100644 --- a/ui/capture.c +++ b/ui/capture.c @@ -132,7 +132,7 @@ capture_start(capture_options *capture_opts, GPtrArray *capture_comments, ws_message("Capture Start ..."); source = get_iface_list_string(capture_opts, IFLIST_SHOW_FILTER); cf_set_tempfile_source((capture_file *)cap_session->cf, source->str); - g_string_free(source, true); + g_string_free(source, TRUE); /* try to start the capture child process */ if (!sync_pipe_start(capture_opts, capture_comments, cap_session, cap_data, update_cb)) { @@ -738,7 +738,7 @@ capture_input_closed(capture_session *cap_session, char *msg) } ws_warning("%s", msg); simple_dialog(dlg_type, ESD_BTN_OK, "%s", gui_msg->str); - g_string_free(gui_msg, true); + g_string_free(gui_msg, TRUE); g_strfreev(msg_lines); } diff --git a/ui/cli/tap-camelsrt.c b/ui/cli/tap-camelsrt.c index b76602c7cc..0f98b99695 100644 --- a/ui/cli/tap-camelsrt.c +++ b/ui/cli/tap-camelsrt.c @@ -225,7 +225,7 @@ static void camelsrt_init(const char *opt_arg, void *userdata _U_) g_free(p_camelsrt); cmdarg_err("Couldn't register camel,srt tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } diff --git a/ui/cli/tap-credentials.c b/ui/cli/tap-credentials.c index b25c40b77c..c5e9e6c931 100644 --- a/ui/cli/tap-credentials.c +++ b/ui/cli/tap-credentials.c @@ -81,7 +81,7 @@ static void credentials_init(const char *opt_arg _U_, void *userdata _U_) if (error_string) { /* error, we failed to attach to the tap. clean up */ cmdarg_err("Couldn't register credentials tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } diff --git a/ui/cli/tap-diameter-avp.c b/ui/cli/tap-diameter-avp.c index b3fa18d913..bc1b273d71 100644 --- a/ui/cli/tap-diameter-avp.c +++ b/ui/cli/tap-diameter-avp.c @@ -254,7 +254,7 @@ diameteravp_init(const char *opt_arg, void *userdata _U_) g_string_append(filter, field); } g_strfreev(tokens); - ds->filter = g_string_free(filter, false); + ds->filter = g_string_free(filter, FALSE); error_string = register_tap_listener("diameter", ds, ds->filter, 0, NULL, diameteravp_packet, diameteravp_draw, NULL); if (error_string) { @@ -263,7 +263,7 @@ diameteravp_init(const char *opt_arg, void *userdata _U_) cmdarg_err("Couldn't register diam,csv tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } } diff --git a/ui/cli/tap-endpoints.c b/ui/cli/tap-endpoints.c index f32bbaa12e..b71f39f7b4 100644 --- a/ui/cli/tap-endpoints.c +++ b/ui/cli/tap-endpoints.c @@ -114,7 +114,7 @@ void init_endpoints(struct register_ct *ct, const char *filter) g_free(iu); cmdarg_err("Couldn't register endpoint tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } diff --git a/ui/cli/tap-expert.c b/ui/cli/tap-expert.c index 50a582b8c4..8fa812cc15 100644 --- a/ui/cli/tap-expert.c +++ b/ui/cli/tap-expert.c @@ -264,7 +264,7 @@ static void expert_stat_init(const char *opt_arg, void *userdata _U_) (tap_finish_cb)expert_tapdata_free); if (error_string) { printf("Expert tap error (%s)!\n", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); expert_tapdata_free(hs); exit(1); } diff --git a/ui/cli/tap-exportobject.c b/ui/cli/tap-exportobject.c index 2e2f6270bc..013e7a9e3c 100644 --- a/ui/cli/tap-exportobject.c +++ b/ui/cli/tap-exportobject.c @@ -136,7 +136,7 @@ eo_draw(void *tapdata) EXPORT_OBJECT_MAXFILELEN, count); } save_as_fullpath = g_build_filename(save_in_path, safe_filename->str, NULL); - g_string_free(safe_filename, true); + g_string_free(safe_filename, TRUE); } while (g_file_test(save_as_fullpath, G_FILE_TEST_EXISTS) && ++count < prefs.gui_max_export_objects); count = 0; write_file_binary_mode(save_as_fullpath, entry->payload_data, entry->payload_len); @@ -176,7 +176,7 @@ exportobject_handler(void *key, void *value _U_, void *user_data _U_) if (error_msg) { cmdarg_err("Can't register %s tap: %s", (const char*)key, error_msg->str); - g_string_free(error_msg, true); + g_string_free(error_msg, TRUE); g_free(tap_data); g_free(object_list); return; diff --git a/ui/cli/tap-flow.c b/ui/cli/tap-flow.c index c98dcba1b7..04111e2595 100644 --- a/ui/cli/tap-flow.c +++ b/ui/cli/tap-flow.c @@ -100,7 +100,7 @@ flow_init(const char *opt_argp, void *userdata) { sequence_analysis_list_free(flow_info); sequence_analysis_info_free(flow_info); - g_string_free(errp, true); + g_string_free(errp, TRUE); flow_exit("Error registering tap listener."); } } @@ -114,7 +114,7 @@ flow_register(const void *key _U_, void *value, void *userdata _U_) char *cli_string; g_string_append(cmd_str, sequence_analysis_get_name(analysis)); - cli_string = g_string_free(cmd_str, false); + cli_string = g_string_free(cmd_str, FALSE); flow_ui.group = REGISTER_STAT_GROUP_GENERIC; flow_ui.title = NULL; /* construct this from the protocol info? */ diff --git a/ui/cli/tap-follow.c b/ui/cli/tap-follow.c index 666111a3f0..97983deeae 100644 --- a/ui/cli/tap-follow.c +++ b/ui/cli/tap-follow.c @@ -595,7 +595,7 @@ static void follow_stream(const char *opt_argp, void *userdata) if (errp != NULL) { follow_free(follow_info); - g_string_free(errp, true); + g_string_free(errp, TRUE); follow_exit("Error registering tap listener."); } } diff --git a/ui/cli/tap-funnel.c b/ui/cli/tap-funnel.c index acfe213840..fa30a363c8 100644 --- a/ui/cli/tap-funnel.c +++ b/ui/cli/tap-funnel.c @@ -45,7 +45,7 @@ static funnel_text_window_t *new_text_window(funnel_ops_id_t *ops_id _U_, const } static void text_window_clear(funnel_text_window_t *tw) { - g_string_free(tw->text, true); + g_string_free(tw->text, TRUE); tw->text = g_string_new(""); } @@ -54,7 +54,7 @@ static void text_window_append(funnel_text_window_t *tw, const char *text ) { } static void text_window_set_text(funnel_text_window_t *tw, const char *text) { - g_string_free(tw->text, true); + g_string_free(tw->text, TRUE); tw->text = g_string_new(text); } @@ -118,7 +118,7 @@ void funnel_dump_all_text_windows(void) { g_ptr_array_remove_index(text_windows, i); g_free(tw->title); - g_string_free(tw->text, true); + g_string_free(tw->text, TRUE); g_free(tw); } } diff --git a/ui/cli/tap-gsm_astat.c b/ui/cli/tap-gsm_astat.c index e53f22bf45..8ecf93847a 100644 --- a/ui/cli/tap-gsm_astat.c +++ b/ui/cli/tap-gsm_astat.c @@ -324,7 +324,7 @@ gsm_a_stat_init(const char *opt_arg _U_, void *userdata _U_) if (err_p != NULL) { g_free(stat_p); - g_string_free(err_p, true); + g_string_free(err_p, TRUE); exit(1); } diff --git a/ui/cli/tap-hosts.c b/ui/cli/tap-hosts.c index fadc9ff30d..60a1c2b94e 100644 --- a/ui/cli/tap-hosts.c +++ b/ui/cli/tap-hosts.c @@ -122,7 +122,7 @@ hosts_init(const char *opt_arg, void *userdata _U_) /* error, we failed to attach to the tap. clean up */ cmdarg_err("Couldn't register " TAP_NAME " tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } } diff --git a/ui/cli/tap-httpstat.c b/ui/cli/tap-httpstat.c index 08c6a14839..4fe435755e 100644 --- a/ui/cli/tap-httpstat.c +++ b/ui/cli/tap-httpstat.c @@ -261,7 +261,7 @@ httpstat_init(const char *opt_arg, void *userdata _U_) g_free(sp); cmdarg_err("Couldn't register http,stat tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } diff --git a/ui/cli/tap-icmpstat.c b/ui/cli/tap-icmpstat.c index 55fe6d6edb..673b20d7a1 100644 --- a/ui/cli/tap-icmpstat.c +++ b/ui/cli/tap-icmpstat.c @@ -294,7 +294,7 @@ icmpstat_init(const char *opt_arg, void *userdata _U_) g_free(icmpstat); cmdarg_err("Couldn't register icmp,srt tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } } diff --git a/ui/cli/tap-icmpv6stat.c b/ui/cli/tap-icmpv6stat.c index 071c1d5c76..627c9de284 100644 --- a/ui/cli/tap-icmpv6stat.c +++ b/ui/cli/tap-icmpv6stat.c @@ -294,7 +294,7 @@ icmpv6stat_init(const char *opt_arg, void *userdata _U_) g_free(icmpv6stat); cmdarg_err("Couldn't register icmpv6,srt tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } } diff --git a/ui/cli/tap-iostat.c b/ui/cli/tap-iostat.c index 5308630764..2ba79a2c0f 100644 --- a/ui/cli/tap-iostat.c +++ b/ui/cli/tap-iostat.c @@ -1381,7 +1381,7 @@ register_io_tap(io_stat_t *io, unsigned int i, const char *filter) g_free(io); fprintf(stderr, "\ntshark: Couldn't register io,stat tap: %s\n", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } } diff --git a/ui/cli/tap-iousers.c b/ui/cli/tap-iousers.c index fe6b97e8d5..922f0bf89a 100644 --- a/ui/cli/tap-iousers.c +++ b/ui/cli/tap-iousers.c @@ -247,7 +247,7 @@ void init_iousers(struct register_ct *ct, const char *filter) g_free(iu); cmdarg_err("Couldn't register conversations tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } diff --git a/ui/cli/tap-macltestat.c b/ui/cli/tap-macltestat.c index 8b1b9bd686..88785b703a 100644 --- a/ui/cli/tap-macltestat.c +++ b/ui/cli/tap-macltestat.c @@ -511,7 +511,7 @@ static void mac_lte_stat_init(const char *opt_arg, void *userdata _U_) mac_lte_stat_draw, NULL); if (error_string) { - g_string_free(error_string, true); + g_string_free(error_string, TRUE); g_free(hs); exit(1); } diff --git a/ui/cli/tap-protocolinfo.c b/ui/cli/tap-protocolinfo.c index 6c99284022..14b57a29fe 100644 --- a/ui/cli/tap-protocolinfo.c +++ b/ui/cli/tap-protocolinfo.c @@ -113,7 +113,7 @@ protocolinfo_init(const char *opt_arg, void *userdata _U_) /* error, we failed to attach to the tap. complain and clean up */ cmdarg_err("Couldn't register proto,colinfo tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); g_free(rs->filter); g_free(rs); diff --git a/ui/cli/tap-protohierstat.c b/ui/cli/tap-protohierstat.c index fabfd49e3a..2628fdcf3c 100644 --- a/ui/cli/tap-protohierstat.c +++ b/ui/cli/tap-protohierstat.c @@ -210,7 +210,7 @@ protohierstat_init(const char *opt_arg, void *userdata _U_) cmdarg_err("Couldn't register io,phs tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } } diff --git a/ui/cli/tap-rlcltestat.c b/ui/cli/tap-rlcltestat.c index 02cc98a2c6..9ebf051b3e 100644 --- a/ui/cli/tap-rlcltestat.c +++ b/ui/cli/tap-rlcltestat.c @@ -391,7 +391,7 @@ static void rlc_lte_stat_init(const char *opt_arg, void *userdata _U_) rlc_lte_stat_draw, NULL); if (error_string) { - g_string_free(error_string, true); + g_string_free(error_string, TRUE); g_free(hs); exit(1); } diff --git a/ui/cli/tap-rpcprogs.c b/ui/cli/tap-rpcprogs.c index 6fdd937243..28ad353cd7 100644 --- a/ui/cli/tap-rpcprogs.c +++ b/ui/cli/tap-rpcprogs.c @@ -212,7 +212,7 @@ rpcprogs_init(const char *opt_arg _U_, void *userdata _U_) if (error_string) { cmdarg_err("Couldn't register rpc,programs tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } } diff --git a/ui/cli/tap-rtd.c b/ui/cli/tap-rtd.c index 38b68029c2..93a1bd3344 100644 --- a/ui/cli/tap-rtd.c +++ b/ui/cli/tap-rtd.c @@ -106,7 +106,7 @@ init_rtd_tables(register_rtd_t* rtd, const char *filter) if (error_string) { free_rtd_table(&ui->rtd.stat_table); cmdarg_err("Couldn't register srt tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } } diff --git a/ui/cli/tap-rtspstat.c b/ui/cli/tap-rtspstat.c index b24cd84fab..accc0f8536 100644 --- a/ui/cli/tap-rtspstat.c +++ b/ui/cli/tap-rtspstat.c @@ -253,7 +253,7 @@ rtspstat_init(const char *opt_arg, void *userdata _U_) g_free(sp); cmdarg_err("Couldn't register rtsp,stat tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } diff --git a/ui/cli/tap-sctpchunkstat.c b/ui/cli/tap-sctpchunkstat.c index 40abd2205d..5008349da0 100644 --- a/ui/cli/tap-sctpchunkstat.c +++ b/ui/cli/tap-sctpchunkstat.c @@ -209,7 +209,7 @@ sctpstat_init(const char *opt_arg, void *userdata _U_) cmdarg_err("Couldn't register sctp,stat tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } } diff --git a/ui/cli/tap-simple_stattable.c b/ui/cli/tap-simple_stattable.c index ef8264c2a2..0dc9230ca6 100644 --- a/ui/cli/tap-simple_stattable.c +++ b/ui/cli/tap-simple_stattable.c @@ -115,7 +115,7 @@ init_stat_table(stat_tap_table_ui *stat_tap, const char *filter) if (error_string) { /* free_rtd_table(&ui->rtd.stat_table); */ cmdarg_err("Couldn't register tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } } diff --git a/ui/cli/tap-sipstat.c b/ui/cli/tap-sipstat.c index d6db04c2e6..87717eb3ed 100644 --- a/ui/cli/tap-sipstat.c +++ b/ui/cli/tap-sipstat.c @@ -332,7 +332,7 @@ sipstat_init(const char *opt_arg, void *userdata _U_) g_free(sp); cmdarg_err("Couldn't register sip,stat tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } diff --git a/ui/cli/tap-smbsids.c b/ui/cli/tap-smbsids.c index 2742561789..a0ac4d40b5 100644 --- a/ui/cli/tap-smbsids.c +++ b/ui/cli/tap-smbsids.c @@ -72,7 +72,7 @@ smbsids_init(const char *opt_arg _U_, void *userdata _U_) if (error_string) { cmdarg_err("Couldn't register smb,sids tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } } diff --git a/ui/cli/tap-srt.c b/ui/cli/tap-srt.c index 09107f1926..3b7c08c45d 100644 --- a/ui/cli/tap-srt.c +++ b/ui/cli/tap-srt.c @@ -127,7 +127,7 @@ init_srt_tables(register_srt_t* srt, const char *filter) free_srt_table(srt, global_srt_array); g_free(ui); cmdarg_err("Couldn't register srt tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } } diff --git a/ui/cli/tap-stats_tree.c b/ui/cli/tap-stats_tree.c index 0aa5ebacb1..5e2bc8950c 100644 --- a/ui/cli/tap-stats_tree.c +++ b/ui/cli/tap-stats_tree.c @@ -45,7 +45,7 @@ draw_stats_tree(void *psp) stats_tree_is_default_sort_DESC(st)); printf("%s", s->str); - g_string_free(s, true); + g_string_free(s, TRUE); } static void diff --git a/ui/cli/tap-sv.c b/ui/cli/tap-sv.c index b2bbdbf8e8..d724c0d4eb 100644 --- a/ui/cli/tap-sv.c +++ b/ui/cli/tap-sv.c @@ -61,7 +61,7 @@ svstat_init(const char *opt_arg _U_, void *userdata _U_) /* error, we failed to attach to the tap. clean up */ cmdarg_err("Couldn't register sv,stat tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } } diff --git a/ui/cli/tap-wspstat.c b/ui/cli/tap-wspstat.c index 27a9538b8c..d4fb6f1313 100644 --- a/ui/cli/tap-wspstat.c +++ b/ui/cli/tap-wspstat.c @@ -259,7 +259,7 @@ wspstat_init(const char *opt_arg, void *userdata _U_) g_free(sp); cmdarg_err("Couldn't register wsp,stat tap: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } } diff --git a/ui/help_url.c b/ui/help_url.c index 640bb92fe4..989c3296d6 100644 --- a/ui/help_url.c +++ b/ui/help_url.c @@ -42,7 +42,7 @@ user_guide_url(const char *page) { if (g_file_test(ug_dir->str, G_FILE_TEST_IS_DIR)) { g_string_printf(url, "file:///%s/%s", ug_dir->str, page); } - g_string_free(ug_dir, true); + g_string_free(ug_dir, TRUE); #else char *path = g_build_filename(get_doc_dir(), "wsug_html_chunked", page, NULL); if (g_file_test(path, G_FILE_TEST_IS_REGULAR)) { @@ -58,7 +58,7 @@ user_guide_url(const char *page) { if (url->len == 0) { g_string_printf(url, WS_DOCS_URL "wsug_html_chunked/%s", page); } - return g_string_free(url, false); + return g_string_free(url, FALSE); } char * diff --git a/ui/iface_lists.c b/ui/iface_lists.c index 56c95cea68..4b21d13a4b 100644 --- a/ui/iface_lists.c +++ b/ui/iface_lists.c @@ -387,7 +387,7 @@ scan_local_interfaces_filtered(GList * allowed_types, void (*update_cb)(void)) } } device.addresses = g_strdup(ip_str->str); - g_string_free(ip_str, true); + g_string_free(ip_str, TRUE); device.links = NULL; caps = if_info->caps; diff --git a/ui/logray/logray_main_window_slots.cpp b/ui/logray/logray_main_window_slots.cpp index 1e4ae97771..6af3aec1f7 100644 --- a/ui/logray/logray_main_window_slots.cpp +++ b/ui/logray/logray_main_window_slots.cpp @@ -920,7 +920,7 @@ void LograyMainWindow::pushLiveCaptureInProgress() { if (capture_opts->save_file) msgtip += capture_opts->save_file; mainApp->pushStatus(WiresharkApplication::FileStatus, msg, msgtip); - g_string_free(interface_names, true); + g_string_free(interface_names, TRUE); #endif // HAVE_LIBPCAP } diff --git a/ui/qt/bluetooth_device_dialog.cpp b/ui/qt/bluetooth_device_dialog.cpp index 0c5d263484..d9729c5b78 100644 --- a/ui/qt/bluetooth_device_dialog.cpp +++ b/ui/qt/bluetooth_device_dialog.cpp @@ -95,7 +95,7 @@ bluetooth_devices_tap(void *data) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } diff --git a/ui/qt/bluetooth_hci_summary_dialog.cpp b/ui/qt/bluetooth_hci_summary_dialog.cpp index c0fec3a806..c4e592832f 100644 --- a/ui/qt/bluetooth_hci_summary_dialog.cpp +++ b/ui/qt/bluetooth_hci_summary_dialog.cpp @@ -80,7 +80,7 @@ bluetooth_hci_summary_tap_init(void *data) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } @@ -916,7 +916,7 @@ void BluetoothHciSummaryDialog::displayFilterLineEditAccepted() if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } cap_file_.retapPackets(); diff --git a/ui/qt/compiled_filter_output.cpp b/ui/qt/compiled_filter_output.cpp index a1d6bd124d..7e7d778e1c 100644 --- a/ui/qt/compiled_filter_output.cpp +++ b/ui/qt/compiled_filter_output.cpp @@ -95,7 +95,7 @@ void CompiledFilterOutput::compileFilter() } g_mutex_unlock(&pcap_compile_mtx_); compile_results.insert(current.interface, QString(bpf_code_dump->str)); - g_string_free(bpf_code_dump, true); + g_string_free(bpf_code_dump, TRUE); ui->interfaceList->addItem(new QListWidgetItem(current.interface)); pcap_freecode(&fcode); } diff --git a/ui/qt/export_object_dialog.cpp b/ui/qt/export_object_dialog.cpp index 8510b9cec7..79ad427efd 100644 --- a/ui/qt/export_object_dialog.cpp +++ b/ui/qt/export_object_dialog.cpp @@ -264,7 +264,7 @@ void ExportObjectDialog::saveCurrentEntry(QString *tempFile) GString *safe_filename = eo_massage_str(entry_filename.toUtf8().constData(), EXPORT_OBJECT_MAXFILELEN, 0); file_name = WiresharkFileDialog::getSaveFileName(this, mainApp->windowTitleString(tr("Save Object As…")), safe_filename->str); - g_string_free(safe_filename, true); + g_string_free(safe_filename, TRUE); } else { QString path = QDir::tempPath().append("/").append(entry_filename); /* This means, the system must remove the file! */ diff --git a/ui/qt/firewall_rules_dialog.cpp b/ui/qt/firewall_rules_dialog.cpp index b2bc5e7d5f..e36e423585 100644 --- a/ui/qt/firewall_rules_dialog.cpp +++ b/ui/qt/firewall_rules_dialog.cpp @@ -145,7 +145,7 @@ void FirewallRulesDialog::addRule(QString description, syntax_func rule_func, ad ui->textBrowser->append(comment_line); ui->textBrowser->append(rule_str->str); - g_string_free(rule_str, true); + g_string_free(rule_str, TRUE); } diff --git a/ui/qt/gsm_map_summary_dialog.cpp b/ui/qt/gsm_map_summary_dialog.cpp index ac43aa5fdc..acdcd48b6e 100644 --- a/ui/qt/gsm_map_summary_dialog.cpp +++ b/ui/qt/gsm_map_summary_dialog.cpp @@ -374,7 +374,7 @@ register_tap_listener_qt_gsm_map_summary(void) if (err_p != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_p->str); - g_string_free(err_p, true); + g_string_free(err_p, TRUE); exit(1); } diff --git a/ui/qt/io_graph_dialog.cpp b/ui/qt/io_graph_dialog.cpp index 557fa27310..e6917d1f3f 100644 --- a/ui/qt/io_graph_dialog.cpp +++ b/ui/qt/io_graph_dialog.cpp @@ -2128,7 +2128,7 @@ IOGraph::IOGraph(QCustomPlot *parent) : // QMessageBox::critical(this, tr("%1 failed to register tap listener").arg(name_), // error_string->str); // config_err_ = error_string->str; - g_string_free(error_string, true); + g_string_free(error_string, TRUE); tap_registered_ = false; } } @@ -2179,7 +2179,7 @@ bool IOGraph::setFilter(const QString &filter) error_string = check_field_unit(vu_field_.toUtf8().constData(), NULL, val_units_); if (error_string) { config_err_ = error_string->str; - g_string_free(error_string, true); + g_string_free(error_string, TRUE); return false; } @@ -2197,7 +2197,7 @@ bool IOGraph::setFilter(const QString &filter) error_string = set_tap_dfilter(this, full_filter.toUtf8().constData()); if (error_string) { config_err_ = error_string->str; - g_string_free(error_string, true); + g_string_free(error_string, TRUE); return false; } diff --git a/ui/qt/lbm_lbtrm_transport_dialog.cpp b/ui/qt/lbm_lbtrm_transport_dialog.cpp index f0b9ee82e3..9f8b93014d 100644 --- a/ui/qt/lbm_lbtrm_transport_dialog.cpp +++ b/ui/qt/lbm_lbtrm_transport_dialog.cpp @@ -1298,7 +1298,7 @@ void LBMLBTRMTransportDialog::fillTree(void) { QMessageBox::critical(this, tr("LBT-RM Statistics failed to attach to tap"), error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); reject(); } diff --git a/ui/qt/lbm_lbtru_transport_dialog.cpp b/ui/qt/lbm_lbtru_transport_dialog.cpp index a819bdf25e..e01accb757 100644 --- a/ui/qt/lbm_lbtru_transport_dialog.cpp +++ b/ui/qt/lbm_lbtru_transport_dialog.cpp @@ -1717,7 +1717,7 @@ void LBMLBTRUTransportDialog::fillTree(void) { QMessageBox::critical(this, tr("LBT-RU Statistics failed to attach to tap"), error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); reject(); } diff --git a/ui/qt/lbm_stream_dialog.cpp b/ui/qt/lbm_stream_dialog.cpp index 91d1826d58..8988240b28 100644 --- a/ui/qt/lbm_stream_dialog.cpp +++ b/ui/qt/lbm_stream_dialog.cpp @@ -377,7 +377,7 @@ void LBMStreamDialog::fillTree(void) { QMessageBox::critical(this, tr("LBM Stream failed to attach to tap"), error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); reject(); } diff --git a/ui/qt/manage_interfaces_dialog.cpp b/ui/qt/manage_interfaces_dialog.cpp index a9c8d81968..ca7a1d9a7f 100644 --- a/ui/qt/manage_interfaces_dialog.cpp +++ b/ui/qt/manage_interfaces_dialog.cpp @@ -537,7 +537,7 @@ void ManageInterfacesDialog::updateRemoteInterfaceList(GList* rlist, remote_opti device.selected = true; global_capture_opts.num_selected++; g_array_append_val(global_capture_opts.all_ifaces, device); - g_string_free(ip_str, true); + g_string_free(ip_str, TRUE); } /*for*/ } diff --git a/ui/qt/models/atap_data_model.cpp b/ui/qt/models/atap_data_model.cpp index 96abfca348..c3a2f84049 100644 --- a/ui/qt/models/atap_data_model.cpp +++ b/ui/qt/models/atap_data_model.cpp @@ -114,14 +114,14 @@ bool ATapDataModel::enableTap() GString * errorString = register_tap_listener(tap().toUtf8().constData(), hash(), _filter.toUtf8().constData(), TL_IGNORE_DISPLAY_FILTER, &ATapDataModel::tapReset, conversationPacketHandler(), &ATapDataModel::tapDraw, nullptr); if (errorString && errorString->len > 0) { - g_string_free(errorString, true); + g_string_free(errorString, TRUE); _disableTap = true; emit tapListenerChanged(false); return false; } if (errorString) - g_string_free(errorString, true); + g_string_free(errorString, TRUE); emit tapListenerChanged(true); @@ -295,7 +295,7 @@ void ATapDataModel::setFilter(QString filter) } if (errorString) - g_string_free(errorString, true); + g_string_free(errorString, TRUE); } QString ATapDataModel::filter() const diff --git a/ui/qt/models/export_objects_model.cpp b/ui/qt/models/export_objects_model.cpp index f79edd398a..3546db5ccb 100644 --- a/ui/qt/models/export_objects_model.cpp +++ b/ui/qt/models/export_objects_model.cpp @@ -196,7 +196,7 @@ void ExportObjectModel::saveAllEntries(QString path) EXPORT_OBJECT_MAXFILELEN, count); } filename = QString::fromUtf8(safe_filename->str); - g_string_free(safe_filename, true); + g_string_free(safe_filename, TRUE); } while (save_dir.exists(filename) && ++count < prefs.gui_max_export_objects); write_file_binary_mode(qUtf8Printable(save_dir.filePath(filename)), entry->payload_data, entry->payload_len); diff --git a/ui/qt/mtp3_summary_dialog.cpp b/ui/qt/mtp3_summary_dialog.cpp index ffbac57725..37fb50dc5f 100644 --- a/ui/qt/mtp3_summary_dialog.cpp +++ b/ui/qt/mtp3_summary_dialog.cpp @@ -376,7 +376,7 @@ register_tap_listener_qt_mtp3_summary(void) if (err_p != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_p->str); - g_string_free(err_p, true); + g_string_free(err_p, TRUE); exit(1); } diff --git a/ui/qt/multicast_statistics_dialog.cpp b/ui/qt/multicast_statistics_dialog.cpp index e1fe925514..30801647d3 100644 --- a/ui/qt/multicast_statistics_dialog.cpp +++ b/ui/qt/multicast_statistics_dialog.cpp @@ -252,7 +252,7 @@ MulticastStatisticsDialog::MulticastStatisticsDialog(QWidget &parent, CaptureFil if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } diff --git a/ui/qt/rtp_player_dialog.cpp b/ui/qt/rtp_player_dialog.cpp index 3b3c37bcde..0740ddf128 100644 --- a/ui/qt/rtp_player_dialog.cpp +++ b/ui/qt/rtp_player_dialog.cpp @@ -463,7 +463,7 @@ void RtpPlayerDialog::retapPackets() error_string = register_tap_listener("rtp", this, NULL, 0, NULL, tapPacket, NULL, NULL); if (error_string) { report_failure("RTP Player - tap registration failed: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); unlockUI(); return; } diff --git a/ui/qt/sequence_dialog.cpp b/ui/qt/sequence_dialog.cpp index 7fff373ece..8a5419791b 100644 --- a/ui/qt/sequence_dialog.cpp +++ b/ui/qt/sequence_dialog.cpp @@ -640,7 +640,7 @@ void SequenceDialog::fillDiagram() NULL, sequence_analysis_get_packet_func(analysis), NULL, NULL); if (error_string) { report_failure("Sequence dialog - tap registration failed: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } cf_retap_packets(cap_file_.capFile()); diff --git a/ui/qt/utils/qt_ui_utils.cpp b/ui/qt/utils/qt_ui_utils.cpp index 5c2a522f00..addfe20889 100644 --- a/ui/qt/utils/qt_ui_utils.cpp +++ b/ui/qt/utils/qt_ui_utils.cpp @@ -68,7 +68,7 @@ QByteArray gchar_free_to_qbytearray(char *glib_string) QByteArray gstring_free_to_qbytearray(GString *glib_gstring) { QByteArray qt_ba(glib_gstring->str); - g_string_free(glib_gstring, true); + g_string_free(glib_gstring, TRUE); return qt_ba; } diff --git a/ui/qt/voip_calls_dialog.cpp b/ui/qt/voip_calls_dialog.cpp index 3ee52d7ca0..a76b822257 100644 --- a/ui/qt/voip_calls_dialog.cpp +++ b/ui/qt/voip_calls_dialog.cpp @@ -505,7 +505,7 @@ void VoipCallsDialog::prepareFilter() if (filter_length < max_filter_length) { gtk_editable_insert_text(GTK_EDITABLE(main_display_filter_widget), filter_string_fwd->str, -1, &pos); } else { - g_string_free(filter_string_fwd, true); + g_string_free(filter_string_fwd, TRUE); filter_string_fwd = g_string_new(filter_prepend); g_string_append_printf(filter_string_fwd, "("); diff --git a/ui/qt/widgets/wireless_timeline.cpp b/ui/qt/widgets/wireless_timeline.cpp index e904cf49cf..87eb10794f 100644 --- a/ui/qt/widgets/wireless_timeline.cpp +++ b/ui/qt/widgets/wireless_timeline.cpp @@ -300,7 +300,7 @@ void WirelessTimeline::appInitialized() error_string = register_tap_listener("wlan_radio_timeline", this, NULL, TL_REQUIRES_NOTHING, tap_timeline_reset, tap_timeline_packet, NULL/*tap_draw_cb tap_draw*/, NULL); if (error_string) { report_failure("Wireless Timeline - tap registration failed: %s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } diff --git a/ui/qt/wireshark_dialog.cpp b/ui/qt/wireshark_dialog.cpp index f3f5c70c37..ae8fc73c4a 100644 --- a/ui/qt/wireshark_dialog.cpp +++ b/ui/qt/wireshark_dialog.cpp @@ -100,7 +100,7 @@ bool WiresharkDialog::registerTapListener(const char *tap_name, void *tap_data, if (error_string) { QMessageBox::warning(this, tr("Failed to attach to tap \"%1\"").arg(tap_name), error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); return false; } diff --git a/ui/qt/wireshark_main_window_slots.cpp b/ui/qt/wireshark_main_window_slots.cpp index 42fbc96e01..142b621cd5 100644 --- a/ui/qt/wireshark_main_window_slots.cpp +++ b/ui/qt/wireshark_main_window_slots.cpp @@ -990,7 +990,7 @@ void WiresharkMainWindow::pushLiveCaptureInProgress() { if (capture_opts->save_file) msgtip += capture_opts->save_file; mainApp->pushStatus(WiresharkApplication::FileStatus, msg, msgtip); - g_string_free(interface_names, true); + g_string_free(interface_names, TRUE); #endif // HAVE_LIBPCAP } diff --git a/ui/software_update.c b/ui/software_update.c index 1ead26c8fb..0375391285 100644 --- a/ui/software_update.c +++ b/ui/software_update.c @@ -89,7 +89,7 @@ static char *get_appcast_update_url(software_update_channel_e chan) { SU_OSNAME, SU_ARCH, chan_name); - return g_string_free(update_url_str, false); + return g_string_free(update_url_str, FALSE); } #ifdef _WIN32 diff --git a/ui/ssl_key_export.c b/ui/ssl_key_export.c index af71253598..1dfe1e8a42 100644 --- a/ui/ssl_key_export.c +++ b/ui/ssl_key_export.c @@ -146,7 +146,7 @@ ssl_export_sessions(size_t *length) } *length = keylist->len; - return g_string_free(keylist, false); + return g_string_free(keylist, FALSE); } void diff --git a/ui/tap-rlc-graph.c b/ui/tap-rlc-graph.c index 80bcc4c540..ae3972f212 100644 --- a/ui/tap-rlc-graph.c +++ b/ui/tap-rlc-graph.c @@ -133,7 +133,7 @@ rlc_3gpp_tap_info* select_rlc_lte_session(capture_file *cf, if (error_string){ fprintf(stderr, "wireshark: Couldn't register rlc_lte_graph tap: %s\n", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); dfilter_free(sfcode); exit(1); /* XXX: fix this */ } @@ -290,7 +290,7 @@ bool rlc_graph_segment_list_get(capture_file *cf, struct rlc_graph *g, bool stre if (error_string) { fprintf(stderr, "wireshark: Couldn't register rlc_graph tap: %s\n", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); /* XXX: fix this */ } cf_retap_packets(cf); diff --git a/ui/tap-rtp-common.c b/ui/tap-rtp-common.c index c72effaa16..ef2d1464cc 100644 --- a/ui/tap-rtp-common.c +++ b/ui/tap-rtp-common.c @@ -229,7 +229,7 @@ register_tap_listener_rtpstream(rtpstream_tapinfo_t *tapinfo, const char *fstrin if (tap_error) { tap_error(error_string); } - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } @@ -287,7 +287,7 @@ static void update_payload_names(rtpstream_info_t *stream_info, const struct _rt g_free(stream_info->all_payload_type_names); } stream_info->all_payload_type_names = payload_type_names->str; - g_string_free(payload_type_names, false); + g_string_free(payload_type_names, FALSE); } bool rtpstream_is_payload_used(const rtpstream_info_t *stream_info, const uint8_t payload_type) diff --git a/ui/tap-sctp-analysis.c b/ui/tap-sctp-analysis.c index 150074fca5..65ddbd4b21 100644 --- a/ui/tap-sctp-analysis.c +++ b/ui/tap-sctp-analysis.c @@ -1286,7 +1286,7 @@ register_tap_listener_sctp_stat(void) { if ((error_string = register_tap_listener("sctp", &sctp_tapinfo_struct, NULL, 0, reset, packet, NULL, NULL))) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); return; } sctp_tapinfo_struct.is_registered=true; diff --git a/ui/tap-tcp-stream.c b/ui/tap-tcp-stream.c index 211fa17285..25ea10e24e 100644 --- a/ui/tap-tcp-stream.c +++ b/ui/tap-tcp-stream.c @@ -155,7 +155,7 @@ graph_segment_list_get(capture_file *cf, struct tcp_graph *tg) if (error_string) { fprintf(stderr, "wireshark: Couldn't register tcp_graph tap: %s\n", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); /* XXX: fix this */ } cf_retap_packets(cf); @@ -317,7 +317,7 @@ select_tcpip_session(capture_file *cf) if (error_string) { fprintf(stderr, "wireshark: Couldn't register tcp_graph tap: %s\n", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); exit(1); } diff --git a/ui/tap_export_pdu.c b/ui/tap_export_pdu.c index 498c48f3b2..ca52debe7b 100644 --- a/ui/tap_export_pdu.c +++ b/ui/tap_export_pdu.c @@ -116,7 +116,7 @@ exp_pdu_open(exp_pdu_t *exp_pdu_tap_data, char *pathname, * create this section. */ opt_len = os_info_str->len; - opt_str = g_string_free(os_info_str, false); + opt_str = g_string_free(os_info_str, FALSE); if (opt_str) { wtap_block_add_string_option(shb_hdr, OPT_SHB_OS, opt_str, opt_len); g_free(opt_str); @@ -224,7 +224,7 @@ exp_pdu_pre_open(const char *tap_name, const char *filter, exp_pdu_t *exp_pdu_ta NULL, NULL); if (error_string != NULL) - return g_string_free(error_string, false); + return g_string_free(error_string, FALSE); exp_pdu_tap_data->pkt_encap = export_pdu_tap_get_encap(tap_name); diff --git a/ui/text_import.c b/ui/text_import.c index a84be47f3d..242f4ee0d2 100644 --- a/ui/text_import.c +++ b/ui/text_import.c @@ -1784,14 +1784,14 @@ text_import_pre_open(wtap_dump_params * const params, int file_type_subtype, con if (info_str->str) { wtap_block_add_string_option(shb_hdr, OPT_SHB_HARDWARE, info_str->str, info_str->len); } - g_string_free(info_str, true); + g_string_free(info_str, TRUE); info_str = g_string_new(""); get_os_version_info(info_str); if (info_str->str) { wtap_block_add_string_option(shb_hdr, OPT_SHB_OS, info_str->str, info_str->len); } - g_string_free(info_str, true); + g_string_free(info_str, TRUE); wtap_block_add_string_option_format(shb_hdr, OPT_SHB_USERAPPL, "%s", get_appname_and_version()); diff --git a/ui/voip_calls.c b/ui/voip_calls.c index ea30b437f6..2e6b560498 100644 --- a/ui/voip_calls.c +++ b/ui/voip_calls.c @@ -556,7 +556,7 @@ rtp_event_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } @@ -903,7 +903,7 @@ rtp_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } @@ -1107,7 +1107,7 @@ t38_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } @@ -1343,7 +1343,7 @@ sip_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } @@ -1551,7 +1551,7 @@ isup_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } @@ -1631,7 +1631,7 @@ mtp3_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } error_string = register_tap_listener("m3ua", tap_base_to_id(tap_id_base, tap_id_offset_m3ua_), @@ -1646,7 +1646,7 @@ mtp3_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } @@ -1965,7 +1965,7 @@ q931_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } @@ -2262,7 +2262,7 @@ h225_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } @@ -2432,7 +2432,7 @@ h245dg_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } @@ -2508,7 +2508,7 @@ sdp_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } @@ -2897,7 +2897,7 @@ mgcp_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } @@ -3028,7 +3028,7 @@ actrace_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } @@ -3128,7 +3128,7 @@ h248_calls_packet_common(voip_calls_tapinfo_t *tapinfo, packet_info *pinfo, epan } } - callsinfo->to_identity = g_string_free(s,false); + callsinfo->to_identity = g_string_free(s,FALSE); callsinfo->stop_fd = pinfo->fd; callsinfo->stop_rel_ts = pinfo->rel_ts; @@ -3206,7 +3206,7 @@ h248_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } error_string = register_tap_listener("h248", tap_base_to_id(tap_id_base, tap_id_offset_h248_), @@ -3220,7 +3220,7 @@ h248_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } @@ -3408,7 +3408,7 @@ void sccp_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } error_string = register_tap_listener("sua", tap_base_to_id(tap_id_base, tap_id_offset_sua_), @@ -3422,7 +3422,7 @@ void sccp_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } @@ -3899,7 +3899,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e /* free data */ g_free(comment); - g_string_free(g_tmp, true); + g_string_free(g_tmp, TRUE); tapinfo->redraw |= REDRAW_UNISTIM; @@ -3938,7 +3938,7 @@ unistim_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) { if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } @@ -4111,7 +4111,7 @@ skinny_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } @@ -4258,7 +4258,7 @@ iax2_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } @@ -4377,7 +4377,7 @@ voip_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } @@ -4448,7 +4448,7 @@ prot_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); - g_string_free(error_string, true); + g_string_free(error_string, TRUE); } } diff --git a/wiretap/merge.c b/wiretap/merge.c index cd76269a70..cefee8ed0c 100644 --- a/wiretap/merge.c +++ b/wiretap/merge.c @@ -523,7 +523,7 @@ create_shb_header(const merge_in_file_t *in_files, const unsigned in_file_count, * writes nothing without reporting an error.) What if we support other * output file formats later? */ - opt_str = g_string_free(comment_gstr, false); + opt_str = g_string_free(comment_gstr, FALSE); /* XXX: We probably want to prepend (insert at index 0) instead? */ wtap_block_add_string_option_owned(shb_hdr, OPT_COMMENT, opt_str); /* @@ -532,7 +532,7 @@ create_shb_header(const merge_in_file_t *in_files, const unsigned in_file_count, */ wtap_block_remove_option(shb_hdr, OPT_SHB_HARDWARE); opt_len = os_info_str->len; - opt_str = g_string_free(os_info_str, false); + opt_str = g_string_free(os_info_str, FALSE); if (opt_str) { wtap_block_set_string_option_value(shb_hdr, OPT_SHB_OS, opt_str, opt_len); /* UTF-8 string containing the name */ /* of the operating system used to create this section. */ diff --git a/wiretap/rtpdump.c b/wiretap/rtpdump.c index d4379b2b5b..55aa53970a 100644 --- a/wiretap/rtpdump.c +++ b/wiretap/rtpdump.c @@ -142,7 +142,7 @@ rtpdump_open(wtap *wth, int *err, char **err_info) header_str = g_string_sized_new(RTP_HEADER_MAX_LEN); do { if (!wtap_read_bytes(wth->fh, &ch, 1, err, err_info)) { - g_string_free(header_str, true); + g_string_free(header_str, TRUE); return (*err == WTAP_ERR_SHORT_READ) ? WTAP_OPEN_NOT_MINE : WTAP_OPEN_ERROR; @@ -159,7 +159,7 @@ rtpdump_open(wtap *wth, int *err, char **err_info) else { *err = WTAP_ERR_BAD_FILE; *err_info = ws_strdup("rtpdump: bad IP in header text"); - g_string_free(header_str, true); + g_string_free(header_str, TRUE); return WTAP_OPEN_ERROR; } @@ -170,13 +170,13 @@ rtpdump_open(wtap *wth, int *err, char **err_info) if (!got_ip) { *err = WTAP_ERR_BAD_FILE; *err_info = ws_strdup("rtpdump: no IP in header text"); - g_string_free(header_str, true); + g_string_free(header_str, TRUE); return WTAP_OPEN_ERROR; } if (!ws_strtou16(header_str->str, NULL, &txt_port)) { *err = WTAP_ERR_BAD_FILE; *err_info = ws_strdup("rtpdump: bad port in header text"); - g_string_free(header_str, true); + g_string_free(header_str, TRUE); return WTAP_OPEN_ERROR; } break; @@ -185,12 +185,12 @@ rtpdump_open(wtap *wth, int *err, char **err_info) g_string_append_c(header_str, ch); } else { - g_string_free(header_str, true); + g_string_free(header_str, TRUE); return WTAP_OPEN_NOT_MINE; } } while (ch != '\n'); - g_string_free(header_str, true); + g_string_free(header_str, TRUE); if (!got_ip || txt_port == 0) { *err = WTAP_ERR_BAD_FILE; diff --git a/wiretap/wtap.c b/wiretap/wtap.c index 0d1ca4382a..69056d98b6 100644 --- a/wiretap/wtap.c +++ b/wiretap/wtap.c @@ -505,7 +505,7 @@ wtap_get_debug_if_descr(const wtap_block_t if_descr, if_descr_mand->num_stat_entries, line_end); - return g_string_free(info, false); + return g_string_free(info, FALSE); } wtap_block_t diff --git a/wsutil/feature_list.c b/wsutil/feature_list.c index e93ba93fe9..c06a453e9c 100644 --- a/wsutil/feature_list.c +++ b/wsutil/feature_list.c @@ -22,7 +22,7 @@ with_feature(feature_list l, const char *fmt, ...) va_start(arg, fmt); g_string_append_vprintf(msg, fmt, arg); va_end(arg); - *l = g_list_prepend(*l, g_string_free(msg, false)); + *l = g_list_prepend(*l, g_string_free(msg, FALSE)); } void @@ -33,7 +33,7 @@ without_feature(feature_list l, const char *fmt, ...) va_start(arg, fmt); g_string_append_vprintf(msg, fmt, arg); va_end(arg); - *l = g_list_prepend(*l, g_string_free(msg, false)); + *l = g_list_prepend(*l, g_string_free(msg, FALSE)); } static int diff --git a/wsutil/time_util.c b/wsutil/time_util.c index 6d96795311..1fda2c5741 100644 --- a/wsutil/time_util.c +++ b/wsutil/time_util.c @@ -199,7 +199,7 @@ void log_resource_usage(bool reset_delta, const char *format, ...) { va_end(ap); ws_warning("%s", log_str->str); - g_string_free(log_str, true); + g_string_free(log_str, TRUE); } diff --git a/wsutil/version_info.c b/wsutil/version_info.c index 885fcb1df0..9fbee0d221 100644 --- a/wsutil/version_info.c +++ b/wsutil/version_info.c @@ -64,11 +64,11 @@ ws_init_version_info(const char *appname, copyright_info_str = g_string_new(get_copyright_info()); end_string(copyright_info_str); - copyright_info = g_string_free(copyright_info_str, false); + copyright_info = g_string_free(copyright_info_str, FALSE); license_info_str = g_string_new(get_license_info_short()); end_string(license_info_str); - license_info = g_string_free(license_info_str, false); + license_info = g_string_free(license_info_str, FALSE); /* * Combine the supplied application name string with the @@ -90,8 +90,8 @@ ws_init_version_info(const char *appname, /* Get the run-time version information string */ runtime_info_str = get_runtime_version_info(gather_runtime); - comp_info = g_string_free(comp_info_str, false); - runtime_info = g_string_free(runtime_info_str, false); + comp_info = g_string_free(comp_info_str, FALSE); + runtime_info = g_string_free(runtime_info_str, FALSE); /* Add this information to the information to be reported on a crash. */ ws_add_crash_info("%s\n" diff --git a/wsutil/ws_pipe.c b/wsutil/ws_pipe.c index 4101316942..2add60a9ef 100644 --- a/wsutil/ws_pipe.c +++ b/wsutil/ws_pipe.c @@ -223,7 +223,7 @@ convert_to_command_line(char **argv) g_free(quoted_arg); } #endif - return g_string_free(command_line, false); + return g_string_free(command_line, FALSE); } bool ws_pipe_spawn_sync(const char *working_directory, const char *command, int argc, char **args, char **command_output) @@ -457,7 +457,7 @@ bool ws_pipe_spawn_sync(const char *working_directory, const char *command, int status = false; } - local_output = g_string_free(output_string, false); + local_output = g_string_free(output_string, FALSE); CloseHandle(child_stdout_rd); CloseHandle(child_stderr_rd);