Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#FFcccc
langc
/*
 * Swaps two values and requires
 * requires tmp variable to be defined.
 */
#define SWAP(x, y) \
  tmp = x; \
  x = y; \
  y = tmp

...

Code Block
bgColor#FFcccc
langc
/*
 * Swaps two values and requires
 * requires tmp variable to be defined.
 */
#define SWAP(x,y) { tmp = x; x = y; y = tmp; }

...

Code Block
bgColor#ccccFF
langc
/*
 * Swaps two values and requires
 * requires tmp variable to be defined.
 */
#define SWAP(x, y) \
  do { \
    tmp = x; \
    x = y; \
    y = tmp; } \
  while (0)

...