]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3923: cbdata and undefined behavior due to dynamic runtime enumeration
author'noloader' <noloader@gmail.com>
Sun, 29 Sep 2013 18:13:17 +0000 (12:13 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 29 Sep 2013 18:13:17 +0000 (12:13 -0600)
src/cbdata.h

index a30cfff4bf4f86340bd36ed4a6468ccb279e9a58..fdb116c5426674237536fca144f191ed5fcb4249 100644 (file)
 
 /**
  *\ingroup CBDATAAPI
- * cbdata types. similar to the MEM_* types above, but managed
- * in cbdata.c. A big difference is that these types are dynamically
- * allocated. This list is only a list of predefined types. Other types
- * are added runtime
+ * cbdata types. Similar to the MEM_* types, but managed in cbdata.cc
+ * A big difference is that cbdata types are dynamically allocated.
+ * Initially only UNKNOWN type is predefined. Other types are added runtime.
  */
-typedef enum {
-    CBDATA_UNKNOWN = 0
-} cbdata_type;
+typedef int cbdata_type;
+static const cbdata_type CBDATA_UNKNOWN = 0;
 
 /// \ingroup CBDATAAPI
 void cbdataRegisterWithCacheManager(void);