Hi On Thu, Nov 22, 2018 at 2:54 AM Samuel Thibault <samuel.thiba...@ens-lyon.org> wrote: > > to get them out of the hot path. > > Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> > --- > slirp/debug.h | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/slirp/debug.h b/slirp/debug.h > index ff920f0b87..ad4e07aa01 100644 > --- a/slirp/debug.h > +++ b/slirp/debug.h > @@ -17,7 +17,7 @@ > extern int slirp_debug; > > #define DEBUG_CALL(fmt, ...) do { \ > - if (slirp_debug & DBG_CALL) { \ > + if (unlikely(slirp_debug & DBG_CALL)) { \ > fprintf(dfd, fmt, ##__VA_ARGS__); \ > fprintf(dfd, "...\n"); \ > fflush(dfd); \ > @@ -25,7 +25,7 @@ extern int slirp_debug; > } while (0) > > #define DEBUG_ARG(fmt, ...) do { \ > - if (slirp_debug & DBG_CALL) { \ > + if (unlikely(slirp_debug & DBG_CALL)) { \ > fputc(' ', dfd); \ > fprintf(dfd, fmt, ##__VA_ARGS__); \ > fputc('\n', dfd); \ > @@ -36,14 +36,14 @@ extern int slirp_debug; > #define DEBUG_ARGS(fmt, ...) DEBUG_ARG(fmt, ##__VA_ARGS__) > > #define DEBUG_MISC(fmt, ...) do { \ > - if (slirp_debug & DBG_MISC) { \ > + if (unlikely(slirp_debug & DBG_MISC)) { \ > fprintf(dfd, fmt, ##__VA_ARGS__); \ > fflush(dfd); \ > } \ > } while (0) > > #define DEBUG_ERROR(fmt, ...) do { \ > - if (slirp_debug & DBG_ERROR) { \ > + if (unlikely(slirp_debug & DBG_ERROR)) { \ > fprintf(dfd, fmt, ##__VA_ARGS__); \ > fflush(dfd); \ > } \ > -- > 2.19.1 > >
With s/unlikely/G_UNLIKELY: Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> -- Marc-André Lureau