More "FT_BOOLEAN is 64-bit" fixes.

Change-Id: Iaacd492858ca2fb98c4947d587fbbd26fc102a7d
Reviewed-on: https://code.wireshark.org/review/14486
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2016-03-15 16:08:06 -07:00
parent 3570d264c1
commit af8de1a7c5
5 changed files with 8 additions and 8 deletions

View File

@ -434,13 +434,13 @@ proto_tree_write_node_pdml(proto_node *node, gpointer data)
case FT_UINT16:
case FT_UINT24:
case FT_UINT32:
case FT_BOOLEAN:
fprintf(pdata->fh, "%X", fvalue_get_uinteger(&fi->value));
break;
case FT_INT40:
case FT_INT48:
case FT_INT56:
case FT_INT64:
case FT_BOOLEAN:
fprintf(pdata->fh, "%" G_GINT64_MODIFIER "X", fvalue_get_sinteger64(&fi->value));
break;
case FT_UINT40:

View File

@ -5002,18 +5002,18 @@ proto_custom_set(proto_tree* tree, GSList *field_ids, gint occurrence,
break;
case FT_BOOLEAN:
number = fvalue_get_uinteger(&finfo->value);
number64 = fvalue_get_uinteger64(&finfo->value);
tfstring = (const true_false_string *)&tfs_true_false;
if (hfinfo->strings) {
tfstring = (const struct true_false_string*) hfinfo->strings;
}
offset_r += protoo_strlcpy(result+offset_r,
number ?
number64 ?
tfstring->true_string :
tfstring->false_string, size-offset_r);
offset_e += protoo_strlcpy(expr+offset_e,
number ? "1" : "0", size-offset_e);
number64 ? "1" : "0", size-offset_e);
break;
/* XXX - make these just FT_NUMBER? */

View File

@ -95,7 +95,7 @@ WSLUA_METAMETHOD FieldInfo__call(lua_State* L) {
switch(fi->ws_fi->hfinfo->type) {
case FT_BOOLEAN:
lua_pushboolean(L,(int)fvalue_get_uinteger(&(fi->ws_fi->value)));
lua_pushboolean(L,(int)fvalue_get_uinteger64(&(fi->ws_fi->value)));
return 1;
case FT_UINT8:
case FT_UINT16:

View File

@ -1313,9 +1313,9 @@ static gboolean print_field_value(field_info *finfo, int cmd_line_index)
case SF_STRVAL:
switch(hfinfo->type) {
case FT_BOOLEAN:
uvalue = fvalue_get_uinteger(&finfo->value);
uvalue64 = fvalue_get_uinteger64(&finfo->value);
tfstring = (const struct true_false_string*) hfinfo->strings;
g_string_append(label_s, uvalue ? tfstring->true_string : tfstring->false_string);
g_string_append(label_s, uvalue64 ? tfstring->true_string : tfstring->false_string);
break;
case FT_INT8:
case FT_INT16:

View File

@ -611,7 +611,7 @@ new_finfo_window(GtkWidget *w, struct FieldinfoWinData *DataPtr)
} else if (finfo_type == FT_BOOLEAN) {
fvalue_edit = gtk_check_button_new();
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fvalue_edit), (fvalue_get_uinteger(&finfo->value) != 0));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fvalue_edit), (fvalue_get_uinteger64(&finfo->value) != 0));
g_signal_connect(fvalue_edit, "toggled", G_CALLBACK(finfo_boolean_changed), DataPtr);
} else if (finfo_type == FT_IPv4) {