Search Linux Wireless

Re: [PATCH 2/3] iw: Print TXQ statistics for stations and interfaces

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

 



On Mon, 2018-02-19 at 18:02 +0100, Toke Høiland-Jørgensen wrote:
> 
> +	if (header && tid >= 0)
> +		pos += snprintf(buf, buflen, "\n\t\tTID\tqsz-byt\t"
> +				"qsz-pkt\tflows\tdrops\tmarks\toverlmt\t"
> +				"hashcol\ttx-bytes\ttx-packets");
> +	else if (header)
> +		pos += snprintf(buf, buflen, "\n\t\tqsz-byt\t"
> +				"qsz-pkt\tflows\tdrops\tmarks\toverlmt\t"
> +				"hashcol\ttx-bytes\ttx-packets");
> +
> +	if (tid >= 0)
> +		pos += snprintf(pos, buflen - (pos - buf), "\n\t\t%d", tid);
> +	else
> +		pos += snprintf(pos, buflen - (pos - buf), "\n\t");
> +
> +	txqinfo = txqstats_info[NL80211_TXQ_STATS_BACKLOG_BYTES];
> +	if (txqinfo)
> +		pos += snprintf(pos, buflen - (pos - buf), "\t%u",
> +				nla_get_u32(txqinfo));

since the header is fixed, shouldn't all of these get an else branch
that just prints a tab or so?

johannes



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux