Fix errors in C code
Merge pull request #4 from lamblin/take-op-c-code-clean

Fix errors in C code