lkml.org 
[lkml]   [2015]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] staging: dgnc: Replace macro with flow control statement by a function
From
Date
On Mon, 06 Jul 2015 18:50:12 +0530, Ravi Teja Darbha said:
> Why would you use a macro to avoid code duplication?

The macro does end up putting code in each place it's used.
However, the actual code is in one place rather than open-coded
in multiple places that can diverge over time (somebody patching 2 of
3 instances, and missing 1, for example).
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-07-06 16:01    [W:0.059 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site