]> git.itanic.dy.fi Git - glucose/commit
contour-protocol: Replace bad macros with static functions
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Tue, 27 Mar 2012 18:52:06 +0000 (21:52 +0300)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Tue, 27 Mar 2012 18:52:06 +0000 (21:52 +0300)
commita0781922944e125b905665cfe3d7c846bc5b185f
tree775c64e35e24cf159d43b85e1e82fc087a0fc5f7
parent449770ae304a3c5ee656c0c6e50eb90bdcec1255
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>
contour-protocol.c