scanner: Fix the setter prototype and return value

A setter is expected to return 0 on success and -1 on failulre.
Merge pull request #10 from lu-zero/master

scanner: Fix the setter prototype and return value