chiark / gitweb /
macro: use unique variable names for math-macros
authorDavid Herrmann <dh.herrmann@gmail.com>
Thu, 28 Aug 2014 12:45:38 +0000 (14:45 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Thu, 28 Aug 2014 12:45:38 +0000 (14:45 +0200)
commit667a0377fb25ddb0c3efbc43d186ffd4c097ce41
treeca22fac8400cc1ab67826bb545ae6f5907e78afd
parentd974ad0524942882f489914013d08ab16d147170
macro: use unique variable names for math-macros

Similar to container_of(), we now use unique variable names for the bascic
math macros MAX, MIN, CLAMP, LESS_BY. Furthermore, unit tests are added to
verify they work as expected.

For a rationale, see:
    commit fb835651aff79a1e7fc5795086c9b26e59a8e6ca
    Author: David Herrmann <dh.herrmann@gmail.com>
    Date:   Fri Aug 22 14:41:37 2014 +0200

        shared: make container_of() use unique variable names
src/shared/macro.h
src/test/test-util.c