fwknop
fwknop copied to clipboard
Use of the __func__ identifier
I was wondering if it would be a good idea to use the func identifier to display the name of the function when a warning is logged for example.
log("my first function(): here is the error description")
could be replaced by :
log("%s(): here is the error description", __func__)
But I am not sure about portability. Any thoughts ?
I think portability may pose an issue with the func identifier. My opinion is that it would need to be gated by an autoconf check (assuming this is possible and reliable) and corresponding #define wrappers.