Skip to content

Commit

Permalink
ALSA: usb-audio: make hwc_debug a noop in case HW_CONST_DEBUG is not set
Browse files Browse the repository at this point in the history
Just defining it to nothing is dangerous as it can alter the code
execution flow, for example when used in as only function in a
conditional code block.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Daniel Mack authored and Takashi Iwai committed May 18, 2011
1 parent 23dc05a commit 60ed286
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/usb/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifdef HW_CONST_DEBUG
#define hwc_debug(fmt, args...) printk(KERN_DEBUG fmt, ##args)
#else
#define hwc_debug(fmt, args...) /**/
#define hwc_debug(fmt, args...) do { } while(0)
#endif

#endif /* __USBAUDIO_DEBUG_H */
Expand Down

0 comments on commit 60ed286

Please sign in to comment.