diff options
author | Guy Harris <guy@alum.mit.edu> | 2005-08-20 09:35:55 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2005-08-20 09:35:55 +0000 |
commit | 393366d5dd6012bf0e6590fedef500d02f2650fe (patch) | |
tree | fc342e226c48f6073840dc18b4e370fc7238e9eb /epan/osi-utils.c | |
parent | 0ec73a5eff1c07417fd32dc58daafae09b2cbdbe (diff) |
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
Diffstat (limited to 'epan/osi-utils.c')
-rw-r--r-- | epan/osi-utils.c | 6 |
1 files changed, 4 insertions, 2 deletions
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 */ |