Home
last modified time | relevance | path

Searched refs:num_old (Results 1 – 4 of 4) sorted by relevance

/external/iproute2/tc/
Dm_xt_old.c97 unsigned int num_old, num_new, i; in merge_options() local
99 for (num_old = 0; oldopts[num_old].name; num_old++) ; in merge_options()
104 merge = malloc(sizeof (struct option) * (num_new + num_old + 1)); in merge_options()
105 memcpy(merge, oldopts, num_old * sizeof (struct option)); in merge_options()
107 merge[num_old + i] = newopts[i]; in merge_options()
108 merge[num_old + i].val += *option_offset; in merge_options()
110 memset(merge + num_old + num_new, 0, sizeof (struct option)); in merge_options()
Dm_ipt.c178 unsigned int num_old, num_new, i; in merge_options() local
180 for (num_old = 0; oldopts[num_old].name; num_old++) ; in merge_options()
185 merge = malloc(sizeof (struct option) * (num_new + num_old + 1)); in merge_options()
186 memcpy(merge, oldopts, num_old * sizeof (struct option)); in merge_options()
188 merge[num_old + i] = newopts[i]; in merge_options()
189 merge[num_old + i].val += *option_offset; in merge_options()
191 memset(merge + num_old + num_new, 0, sizeof (struct option)); in merge_options()
/external/iptables/libxtables/
Dxtoptions.c77 unsigned int num_orig, num_old = 0, num_new, i; in xtables_options_xfrm() local
85 for (num_old = 0; oldopts[num_old].name != NULL; ++num_old) in xtables_options_xfrm()
95 num_old -= num_orig; in xtables_options_xfrm()
97 merge = malloc(sizeof(*mp) * (num_orig + num_old + num_new + 1)); in xtables_options_xfrm()
117 memcpy(mp, oldopts, sizeof(*mp) * num_old); in xtables_options_xfrm()
118 mp += num_old; in xtables_options_xfrm()
Dxtables.c107 unsigned int num_oold = 0, num_old = 0, num_new = 0, i; in xtables_merge_options() local
115 for (num_old = 0; oldopts[num_old].name; num_old++) ; in xtables_merge_options()
123 num_old -= num_oold; in xtables_merge_options()
125 merge = malloc(sizeof(*mp) * (num_oold + num_old + num_new + 1)); in xtables_merge_options()
142 memcpy(mp, oldopts, sizeof(*mp) * num_old); in xtables_merge_options()
143 mp += num_old; in xtables_merge_options()