Follow up for revision 32670.
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 6 May 2010 18:41:23 +0000 (18:41 +0000)
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 6 May 2010 18:41:23 +0000 (18:41 +0000)
Straighten out is_acn() function.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32690 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-acn.c

index 1699a1b6452b84dd9ef70acb4155cd2d14c63a57..383a44eefa4956f63f7748ac29dc8793fdc63c3f 100644 (file)
@@ -49,7 +49,6 @@
 #include <epan/prefs.h>
 #include <epan/packet.h>
 #include <epan/ipv6-utils.h>
-#include <string.h>
 
 #include "packet-acn.h"
 
@@ -327,19 +326,13 @@ static const enum_val_t dmx_display_line_format[] = {
 static gboolean is_acn(tvbuff_t *tvb)
 {
   static char acn_packet_id[] = "ASC-E1.17\0\0\0";  /* must be 12 bytes */
-  guint8      *packet_id;
 
   if (tvb_length(tvb) < (4+sizeof(acn_packet_id)))
     return FALSE;
 
   /* Check the bytes in octets 4 - 16 */
-  if (tvb_memeql(tvb, 4, acn_packet_id, sizeof(acn_packet_id)) != 0){
-    packet_id = tvb_get_ephemeral_string(tvb, 4, 12);
-    if (memcmp(packet_id, &acn_packet_id, 12) == 0) {
-      return TRUE;
-    }
+  if (tvb_memeql(tvb, 4, acn_packet_id, sizeof(acn_packet_id)-1) != 0)
     return FALSE;
-  }
 
   return TRUE;
 }