Re: [PATCH v5] tr2: log parent process name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Emily Shaffer <emilyshaffer@xxxxxxxxxx> writes:

Other than your back-and-forth with Randall on NonStop specifics
that didn't result in any code change, there was no comment on this
patch.  Are other people totally happy with this version, or are
they totally uninterested?

> +	if (reason == TRACE2_PROCESS_INFO_STARTUP) {
> +		/*
> +		 * NEEDSWORK: we could do the entire ptree in an array instead,
> +		 * see compat/win32/trace2_win32_process_info.c.
> +		 */
> +		struct strvec names = STRVEC_INIT;
> +
> +		get_ancestry_names(&names);
> +
> +		if (names.nr == 0) {
>
> +			strvec_clear(&names);
> +			return;
> +		}
>
> +		trace2_cmd_ancestry(names.v);
> +
> +		strvec_clear(&names);


Micronit.  CodingGuidelines tells us not to explicitly compare with
constant 0, '\0', or NULL.  It may be more concise and easier to
follow if written like this:

		get_ancestry_names(&names);
		if (names.nr)
			trace2_cmd_ancestry(names.v);
		strvec_clear(&names);


Thanks.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux