Introduce vtracef
authorMaxime Roussin-Belanger <maxime.roussinbelanger@gmail.com>
Tue, 3 Mar 2020 23:10:30 +0000 (18:10 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 4 Mar 2020 15:24:32 +0000 (10:24 -0500)
vtracef accepts a va_list argument to simplify
tracing functions which use a va_list

Here's an example from wpa_supplicant that I wanted to
trace:

void wpa_debug(int level, const char* fmt, ...)
{
va_list ap;
va_start(ap, fmt);

...
// The call I want to easily trace with vtracef
vprintf(fmt, ap);

...
va_end(ap);
}

wpa_debug is used a fair amount and it would be annoying to
replace all the wpa_debug calls with tracef.

With vtracef, it simplifies the find and replace effort by
only changing it at one place.

Signed-off-by: Maxime Roussin-Belanger <maxime.roussinbelanger@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

No differences found
This page took 0.030039 seconds and 5 git commands to generate.