]> git.ozlabs.org Git - ccan/blobdiff - ccan/likely/likely.h
modules: update documentation examples so they compile under ccanlint.
[ccan] / ccan / likely / likely.h
index 62a203727507f359dcfa46ef4209629dfa79a848..eed1f209f7535c6d1d13f7e8abb1a580f10c267c 100644 (file)
@@ -23,7 +23,7 @@
  *     // Returns false if we overflow.
  *     static inline bool inc_int(unsigned int *val)
  *     {
  *     // Returns false if we overflow.
  *     static inline bool inc_int(unsigned int *val)
  *     {
- *             *(val)++;
+ *             (*val)++;
  *             if (likely(*val))
  *                     return true;
  *             return false;
  *             if (likely(*val))
  *                     return true;
  *             return false;
@@ -45,7 +45,7 @@
  *     // Prints a warning if we overflow.
  *     static inline void inc_int(unsigned int *val)
  *     {
  *     // Prints a warning if we overflow.
  *     static inline void inc_int(unsigned int *val)
  *     {
- *             *(val)++;
+ *             (*val)++;
  *             if (unlikely(*val == 0))
  *                     fprintf(stderr, "Overflow!");
  *     }
  *             if (unlikely(*val == 0))
  *                     fprintf(stderr, "Overflow!");
  *     }