On Tuesday 17 March 2015 06:59:17 Anatoliy wrote:
I'm still not sure about buf[sizeof(buf)-1] = '\0'; and command[command_len - 1] = '\0'; lines.
As far as I know snprintf appends '\0', so "buf" will always have null terminator. And so command will always have \0.
You are right for buf. snprintf indeed guarantees termination with \0 for size
- So please remove the buf line.
But strncpy doesn't guarantees this. So please add the line after the strncpy into the buffer command.
Should I rebase my commit to after new public commits?
Your patch must apply on the current master. If it doesn't then please rebase it.
Is there a link to code style used in project?
Already gave you the two relevant links in a previous mail.
Kind regards, Sven