mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-12 11:40:39 +03:00
examples-code-check.c: Disable potential compile warning
Fixes snprintf() warning of writing into smaller buffer.
This commit is contained in:
1 parent
e386160474
commit
63d5248d88
1 file changed
+1
-1
@@ -576,7 +576,7 @@ int main(int argc, char* argv[])
|
||||
i, (int)(sizeof(name_list)/sizeof(name_list[0])));
|
||||
continue;
|
||||
}
|
||||
snprintf(name_list[i], sizeof(name_list[i]), "%s", buffer);
|
||||
memcpy(name_list[i], buffer, sizeof(name_list[i])-1);
|
||||
name_cnt++;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user