Re: [PATCH 2/4] libtraceevent: Add logs with severity info

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

 



On Wed, 28 Apr 2021 10:29:59 +0300
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote:

>  void tep_info(const char *fmt, ...)
>  {
>  	va_list ap;
>  
>	if (log_level < TEP_LOG_INFO)
>		return;
>  
>  	va_start(ap, fmt);
>	tep_vprint("libtraceevent", TEP_LOG_INFO fmt, ap);
>  	va_end(ap);
>  }

The above should just be:

void tep_info(const char *fmt, ...)
{
	va_list ap;

 	va_start(ap, fmt);
	tep_vprint("libtraceevent", TEP_LOG_INFO fmt, ap);
 	va_end(ap);
}

And let the tep_vprint() decide to print it or not.

-- Steve



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

  Powered by Linux