Don't assign const pointers to non-const pointers, especially if the
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 31 Dec 2004 03:17:00 +0000 (03:17 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 31 Dec 2004 03:17:00 +0000 (03:17 +0000)
object pointed to by the non-const pointer won't be modified.

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

epan/dissectors/packet-pflog.c

index 0b022341899908606a55688aeb325d7bb3f31e68..90e8a7ef22d9af99c397da8f324475015f7a3d20 100644 (file)
@@ -81,10 +81,10 @@ static gint ett_old_pflog = -1;
 void
 capture_pflog(const guchar *pd, int offset, int len, packet_counts *ld)
 {
-  struct pfloghdr *pflogh;
+  const struct pfloghdr *pflogh;
   unsigned int hdrlen;
 
-  pflogh = (struct pfloghdr *)pd;
+  pflogh = (const struct pfloghdr *)pd;
 
   if (!BYTES_ARE_IN_FRAME(offset, len, sizeof(guint8))) {
     ld->other++;