On Wed, Jul 5, 2017 at 9:47 AM, Nikolay Marchuk
<marchuk.nikola...@gmail.com> wrote:
>>> +void
>>> +set_filters_qualify_mode(struct filter **filters, unsigned int *nfilters)
>>> +{
>>> +    unsigned int i;
>>> +    for (i = 0; i < *nfilters - 1; ++i) {
>>> +            free_filter(*filters + i);
>>> +    }
>>> +    **filters = (*filters)[*nfilters - 1];
>>> +    *filters = xreallocarray(*filters, 1, sizeof(struct filter));
>> I'm pretty sure realloc() can't be expected to be able to handle 
>> re-allocating
>> memory hunk which is provided by pointer not pointing at the beginning
>> of the hunk. IOW, allocators are not expected to work with arbitrary 
>> pointers,
>> only with ones that are returned by those allocators.
> But pointer isn't changed between allocations.
>>> +
>>> +DECL_FILTER_ACTION_PARSER(null);
>>> +DECL_FILTER_ACTION_PARSER(inject);
>>> +
>>> +#undef DECL_FILTER_ACTION_PARSER
>>> +
>>> +#define FILTER_ACTION_TYPE(NAME, PRIORITY, PARSER, PREFILTER)              
>>>  \
>>> +{#NAME, sizeof(#NAME) - 1,PRIORITY, parse_ ## PARSER, free_ ## PARSER,     
>>>  \
>>> + PREFILTER, apply_ ## NAME}
>> Missing indentation of the macro definition. Incorrect indentation of
>> the structure definition continuation.
> I can't find any references for multi-line structure definitions.
> What indentation should I use?
The default is single tab character, and I see no reason for using
something else in case of structure definition.


-- 
Eugene Syromyatnikov
mailto:evg...@gmail.com
xmpp:esyr@jabber.{ru|org}

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to