From 393366d5dd6012bf0e6590fedef500d02f2650fe Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 20 Aug 2005 09:35:55 +0000 Subject: The order in which arguments to a function are evaluated isn't defined by C. Do decrements of arguments before passing them to a function. svn path=/trunk/; revision=15463 --- epan/osi-utils.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'epan/osi-utils.c') diff --git a/epan/osi-utils.c b/epan/osi-utils.c index 79ecb2d8e4..b7a00605ef 100644 --- a/epan/osi-utils.c +++ b/epan/osi-utils.c @@ -118,7 +118,8 @@ print_system_id_buf( const guint8 *ad, int length, gchar *buf, int buf_len) cur += g_snprintf(cur, buf_len-(cur-buf), "%02x.", ad[tmp++] ); } if ( 1 == tmp ) { /* Special case for Designated IS */ - g_snprintf(--cur, buf_len-(cur-buf), ".%02x", ad[tmp] ); + cur--; + g_snprintf(cur, buf_len-(cur-buf), ".%02x", ad[tmp] ); } else { for ( ; tmp < length; ) { /* print the rest without dot */ @@ -188,7 +189,8 @@ print_area_buf(const guint8 *ad, int length, gchar *buf, int buf_len) cur += g_snprintf(cur, buf_len-(cur-buf), "%02x.", ad[tmp++] ); } if ( 1 == tmp ) { /* Special case for Designated IS */ - g_snprintf(--cur, buf_len-(cur-buf), "-%02x", ad[tmp] ); + cur--; + g_snprintf(cur, buf_len-(cur-buf), "-%02x", ad[tmp] ); } else { for ( ; tmp < length; ) { /* print the rest without dot */ -- cgit v1.2.1