gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] [PATCH]: Add do { ... } while (0) around assignment in macro


From: Matt
Subject: [gpsd-dev] [PATCH]: Add do { ... } while (0) around assignment in macro
Date: Fri, 23 Jan 2015 19:29:47 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0

Add the customary do { ... } while (0) around this macro which expands to executable code (as opposed to an expression). I believe this is not necessary when, as in this case, the code is a single line. But a) it costs nothing, b) it might become multi-line one day, and c) it looks wrong to my C programmer eyes - alarm bells ring every time I read it, and I don't want to blunt that generally healthy reaction.

Attachment: add-missing-do-while-zero-around-assignment-in-macro.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]