[RFC PATCH v3 4/5] Add test for --decode-fds=eventfd

Dmitry V. Levin ldv at strace.io
Mon May 13 12:11:51 UTC 2024


On Fri, May 10, 2024 at 10:44:10AM +0530, Sahil Siddiq wrote:
[...]
> +				matches += 1;

++matches or matches++ would look more natural.

> +				if (!strncmp(search_pfx, "eventfd-id:", search_pfx_len)) {

Wouldn't it be better to conditionalize on fdinfo_lines[i].data instead?

> +					const char *value = line + search_pfx_len;
> +					parse_fdinfo_efd_id(value, fdinfo_lines[i].data);
> +				}


-- 
ldv


More information about the Strace-devel mailing list