mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 19:45:12 +00:00
Tests: Prefer strlcpy over strncpy
Because it looks nicer.
This commit is contained in:
parent
cb52bfdd27
commit
7a2b5d1328
Notes:
sideshowbarker
2024-07-19 03:14:01 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/7a2b5d1328f Pull-request: https://github.com/SerenityOS/serenity/pull/3275 Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ int main(int, char**)
|
|||
struct sockaddr_un addr;
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.sun_family = AF_UNIX;
|
||||
strncpy(addr.sun_path, path, sizeof(addr.sun_path) - 1);
|
||||
strlcpy(addr.sun_path, path, sizeof(addr.sun_path));
|
||||
|
||||
rc = bind(fd, (struct sockaddr*)(&addr), sizeof(addr));
|
||||
if (rc < 0 && errno == EADDRINUSE) {
|
||||
|
|
Loading…
Add table
Reference in a new issue