Re: [PATCH] floppy.c #defines

Eric Lammerts (eric@lammerts.org)
Sun, 2 Dec 2001 14:59:46 +0100 (CET)


On Sun, 2 Dec 2001, Zwane Mwaikambo wrote:

> -#define ECALL(x) if ((ret = (x))) return ret;
> +#define ECALL(x) if ((ret = (x))) return ret

To prevent a dangling else problem, better make that

#define ECALL(x) do { if ((ret = (x))) return ret; } while(0)

Eric

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/