diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2007-11-14 10:15:20 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2007-11-14 10:15:20 +0000 |
commit | ff0346154abf29a74435b2f578b8fac8249a4904 (patch) | |
tree | cd7470d6e34a291ab877d49a8c36ed2da6a670d1 | |
parent | b4980a48bd6eb6393a367682d4aaaceb3c393e05 (diff) |
Added some parentheses to clarify the gint64 cast.
svn path=/trunk/; revision=23447
-rw-r--r-- | gtk/summary_dlg.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk/summary_dlg.c b/gtk/summary_dlg.c index e647a73761..640ae87002 100644 --- a/gtk/summary_dlg.c +++ b/gtk/summary_dlg.c @@ -310,14 +310,14 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_) if (summary.packet_count > 0){ g_snprintf(string_buff, SUM_STR_MAX, "%.3f bytes", /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */ - (float) (gint64) summary.bytes/summary.packet_count); + (float) ((gint64) summary.bytes)/summary.packet_count); } else { strcpy(string_buff, ""); } if (summary.dfilter && summary.filtered_count > 0){ g_snprintf(string_buff2, SUM_STR_MAX, "%.3f bytes", - /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */ - (float) (gint64) summary.filtered_bytes/summary.filtered_count); + /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */ + (float) ((gint64) summary.filtered_bytes)/summary.filtered_count); } else { strcpy(string_buff2, ""); } @@ -335,13 +335,13 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_) /* Bytes per second */ if (seconds > 0){ /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */ - g_snprintf(string_buff, SUM_STR_MAX, "%.3f", ((gint64) summary.bytes)/seconds ); + g_snprintf(string_buff, SUM_STR_MAX, "%.3f", ((gint64) summary.bytes)/seconds); } else { strcpy(string_buff, ""); } if (summary.dfilter && disp_seconds > 0){ /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */ - g_snprintf(string_buff2, SUM_STR_MAX, "%.3f", ((gint64) summary.filtered_bytes)/disp_seconds ); + g_snprintf(string_buff2, SUM_STR_MAX, "%.3f", ((gint64) summary.filtered_bytes)/disp_seconds); } else { strcpy(string_buff2, ""); } |