diff options
author | Guy Harris <guy@alum.mit.edu> | 2009-03-18 20:45:57 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2009-03-18 20:45:57 +0000 |
commit | 59677ebed0014045c18e93bee0431c956e128b8b (patch) | |
tree | 06aa7cdffc0d6385b33f52659febdfe2f69ae519 /epan | |
parent | fd7d6fdc0316d0623aca70796696072a8ef38b10 (diff) |
Use g_strreverse() to reverse strings.
svn path=/trunk/; revision=27783
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-acn.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/epan/dissectors/packet-acn.c b/epan/dissectors/packet-acn.c index 35671f9dea..e71a648b02 100644 --- a/epan/dissectors/packet-acn.c +++ b/epan/dissectors/packet-acn.c @@ -1687,21 +1687,6 @@ dissect_acn_sdt_client_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /******************************************************************************/ -/* reverses the characters in a string */ -static void -reverse(char *s) -{ - char c; - long i,j; - for (i=0, j=strlen(s)-1; i < j; i++, j--) { - c = s[i]; - s[i] = s[j]; - s[j] = c; - } -} - - -/******************************************************************************/ /* level to string (ascii) */ /* level : 8 bit value */ /* string : pointer to buffer to fill */ @@ -1745,7 +1730,7 @@ ltos(guint8 level, gchar *string, guint8 base, gchar leading_char, guint8 min_ch string[i] = '\0'; /* now reverse (and correct) the order */ - reverse(string); + g_strreverse(string); /* add a space at the end (ok its at the start but it will be at the end)*/ string[i++] = ' '; |