Use g_strreverse() to reverse strings.
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 18 Mar 2009 20:45:57 +0000 (20:45 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 18 Mar 2009 20:45:57 +0000 (20:45 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27783 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-acn.c

index 35671f9dea8912ae655340ada0db99e983732ff9..e71a648b0216a1890205018c20c640484aea3031 100644 (file)
@@ -1686,21 +1686,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                                                    */
@@ -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++] = ' ';