From: Ben Pfaff Date: Wed, 4 Mar 2009 21:08:18 +0000 (-0800) Subject: classifier: In testing, don't put cls_rule at beginning of test_rule. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef7e7d52e4830aef0b681e88ed394de46525cbc1;p=openvswitch classifier: In testing, don't put cls_rule at beginning of test_rule. If we put cls_rule at the beginning of struct test_rule, then a cast is sufficient to convert a pointer between the two, but we want to make sure that we don't ever take that shortcut, because it is not valid in general. --- diff --git a/tests/test-classifier.c b/tests/test-classifier.c index 869cfd98..9a824c33 100644 --- a/tests/test-classifier.c +++ b/tests/test-classifier.c @@ -52,8 +52,8 @@ #include struct test_rule { - struct cls_rule cls_rule; /* Classifier rule data. */ int aux; /* Auxiliary data. */ + struct cls_rule cls_rule; /* Classifier rule data. */ }; static struct test_rule *