intel/tinycbor

minor typo in cbor_ntohs macro

phirsov opened this issue · 2 comments

# define cbor_ntohs(x) (((uint16_t)x >> 8) | ((uint16_t)x << 8))

"x" macro parameter should been enclosed in braces for safety:

#    define cbor_ntohs(x) (((uint16_t)(x) >> 8) | ((uint16_t)(x) << 8))
rzr commented

Thxx, Just open a pull request , I think you can edit file in place on github

Please remember to add a Signed-off-By line to your commit when writing the message. But I can fix this quickly if you want me to.