# HG changeset patch # User Sebastien Decugis # Date 1215768455 -32400 # Node ID 94e85f845b69a2b2015a3829a560434b6c2fe2b5 # Parent 4349f4ec01ddb0755d60e66333f4e755f60ebdff Cosmetic: set order only when position is FIXED diff -r 4349f4ec01dd -r 94e85f845b69 waaad/dict-base.c --- a/waaad/dict-base.c Fri Jul 11 18:05:39 2008 +0900 +++ b/waaad/dict-base.c Fri Jul 11 18:27:35 2008 +0900 @@ -67,15 +67,18 @@ int template; } loc_rules_def_t; +#define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) + #define PARSE_loc_rules( _rulearray, _parent) { \ int __ar; \ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ dict_rule_data_t __data = { NULL, \ (_rulearray)[__ar].position, \ - 1, /* at most 1 fixed rule in base protocol */ \ + 0, \ (_rulearray)[__ar].min, \ (_rulearray)[__ar].max, \ (_rulearray)[__ar].template}; \ + __data.rule_order = RULE_ORDER(__data.rule_position); \ CHECK_dict_search( DICT_AVP, \ AVP_BY_NAME, \ (_rulearray)[__ar].avp_name, \