]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3923: cbdata and undefined behavior due to dynamic runtime enumeration
author'noloader' <noloader@gmail.com>
Sat, 21 Sep 2013 14:19:37 +0000 (02:19 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 21 Sep 2013 14:19:37 +0000 (02:19 +1200)
src/cbdata.h

index 51de95e2d0d919a6058709e8dd5de5ce90f40a49..f480596ee14453aff7e32838618b554a8106a244 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);