aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/packet_history.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-01-01 23:19:11 +0000
committerGuy Harris <guy@alum.mit.edu>2005-01-01 23:19:11 +0000
commit0067b4b94e59cf3c72bc5283ba0302e651f81b87 (patch)
tree3d52dc19ce96ea34d1d7d021e926ab2e865018ba /gtk/packet_history.c
parenta46d94072bba5953cc76f324fde3d72b78df8140 (diff)
The right way to check whether a pointer is null and get a Boolean is to
test it against null, not to cast it to a Boolean type - as Boolean types in C89/C90, at least, are just integral types, that cast might just throw away the upper 32 bits; that probably yields the results you want, but the compiler might well justifiably warn about that on an LP64 platform. svn path=/trunk/; revision=12915
Diffstat (limited to 'gtk/packet_history.c')
-rw-r--r--gtk/packet_history.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/packet_history.c b/gtk/packet_history.c
index 917e4a3384..421a63a79c 100644
--- a/gtk/packet_history.c
+++ b/gtk/packet_history.c
@@ -66,8 +66,8 @@ static void adjust_menus(void) {
if(history_current) {
set_menus_for_packet_history(
- (gboolean) g_list_previous(history_current),
- (gboolean) g_list_next(history_current));
+ (g_list_previous(history_current) != NULL),
+ (g_list_next(history_current) != NULL));
} else {
/* we don't have any history */
set_menus_for_packet_history(FALSE, FALSE);