title: Embedded C programming style
body: <p>I have noticed a programming style in Embedded C, used for firmware programming:</p>
  
  <pre><code>#define WRITE_REGISTER(reg, value) \
          do { \
             write_to_register(reg, value); \
          } while (0)
  </code></pre>
  
  <p>How does this do...while (0) help over:</p>
  
  <pre><code>#define WRITE_REGISTER(reg, value) write_to_register(reg, value)
  </code></pre>