This was supposed to be self-documenting but it's fairly obvious that
the extra byte is for the terminator and I'm very worried about weird
things that can happen to the char (int promotions or something).
Change-Id: Ib33404db86055fb1840f5942e9740cbf6199d7c3
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
strncpy(tag_info.tag, tag, sizeof tag_info.tag);
tag_info.tag[sizeof tag_info.tag - 1] = '\0';
- tag_info.len = strlen(tag_info.tag) + sizeof '\0';
+ tag_info.len = strlen(tag_info.tag) + 1;
int r = ioctl(fd, LOGGER_SET_TAG, &tag_info);
if (r < 0)