Re: [PATCH v4 21/46] tools/lib/traceevent: Man pages tep_get_first_event() and tep_get_events_count()

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

 



On Fri,  8 Mar 2019 15:36:29 +0200
Tzvetomir Stoyanov <tstoyanov@xxxxxxxxxx> wrote:

> +#include <event-parse.h>
> +...
> +struct tep_handle *tep = tep_alloc();
> +...
> +int i,count = tep_get_events_count(tep);
> +struct tep_event *event, *events = tep_get_first_event(tep);
> +
> +if (events == NULL) {
> +	/* There are no events */
> +} else {
> +	for (i=0; i<count; i++) {

The examples should follow Linux coding style ;-)

That is, tabs and not spaces, and space out the for:

	for (i = 0; i < count; i++) {

-- Steve

> +		event = (events+i);
> +		/* process events[i] */
> +	}
> +}



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux