[ovs-dev] [PATCH v2] datapath-windows: fix MIN() macro

Ben Pfaff blp at ovn.org
Thu Nov 26 05:56:03 UTC 2015


On Wed, Nov 25, 2015 at 12:16:30PM -0800, Nithin Raju wrote:
> A quick implementation of MIN() didn't take into account operator
> precedence as shown in the following example:
> 
>  #include <stdio.h>
>  #define MYMIN(_a, _b) (_a) > (_b) ? (_b) : (_a)
>  int main() {
>      if (MYMIN(512, 256) < 14) {
>          printf("buggy MYMIN\n");
>      }
>      return 0;
>  }
> 
> Signed-off-by: Nithin Raju <nithin at vmware.com>
> Acked-by: Russell Bryant <russell at ovn.org>

Applied, thanks Nithin and Russell.



More information about the dev mailing list