merces/t50 — pull request #6 by fredericopissarra (2014-02-12 18:15:16+00:00)
Title: Updates on modules.

Now I'm using a trick, using a typedef to a union - called mptr_t, to deal with pointer arithmetic on modules functions. This way we can get rid of the ugly "buffer_ptr += sizeof(type);" after an non "uint8_t" assignment. This will give some control to the compiler optimization cycle to improve the final code.

Also, I changed the "checksum" pointer to "buffer_ptr" ou "buffer" (of mptr_t type). And deleted some unecessary variables... Notice the change on initialization style. I think this is clearer.

Please, consider checking these liens of ospf.c:

:~/sandbox/t50/src/modules$ grep -n correct? ospf.c
ospf.c:376: buffer.ptr--; /* NOTE: From the previous code... Is this correct?! */
ospf.c:416: buffer.ptr--; /* NOTE: From previous code. Is this correct?! */

I believe it is correct, but it must be checked.