contour-protocol: Replace bad macros with static functions
These macros in question were modifying variables outside of their
parameter listing. As the macros were also used in places where using
some of the variables don't make any sense, the were also some
compiler warning that were introduced since gcc version 4.6:
contour-protocol.c: In function ‘contour_read_entry’:
contour-protocol.c:296:6: warning: variable ‘j’ set but not used [-Wunused-but-set-variable]
As there are so many calls to the macros it makes sense to replace
them with static functions. This also cures the compiler
warning. Another plus side is that now using the macro should not have
any hard to miss side effects to other variables.
Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>