[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH] Fix CHANGE macro
The CHANGE(x, y) macro in adapter.c is supposed to evaluate to 0 if x and y are identical, otherwise it is supposed to assign y to x and evaluate to 1. The definition is incorrect though, and in the latter case the assignment is done but the macro still evaluates to 0. This patch fixes the problem. Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> --- src/xennet/adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xennet/adapter.c b/src/xennet/adapter.c index 0509938..de55393 100644 --- a/src/xennet/adapter.c +++ b/src/xennet/adapter.c @@ -544,7 +544,7 @@ invalid_parameter: (x) == NDIS_OFFLOAD_PARAMETERS_RX_ENABLED_TX_DISABLED) #define TX_ENABLED(x) ((x) == NDIS_OFFLOAD_PARAMETERS_TX_RX_ENABLED || \ (x) == NDIS_OFFLOAD_PARAMETERS_TX_ENABLED_RX_DISABLED) -#define CHANGE(x, y) (((x) == (y)) ? 0 : (((x) = (y)) != (y))) +#define CHANGE(x, y) (((x) == (y)) ? 0 : (((x) = (y)), 1)) static NDIS_STATUS AdapterGetTcpOffloadParameters( -- 2.1.1 _______________________________________________ win-pv-devel mailing list win-pv-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |