mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
test/ca-fd-leak: fix clang-tidy lints
(cherry picked from commit b050db951b
)
This commit is contained in:
parent
7ef04ba6dd
commit
97f9f8e909
2 changed files with 2 additions and 1 deletions
|
@ -19,7 +19,7 @@ int main(int argc, char **argv) {
|
||||||
struct sockaddr_un data;
|
struct sockaddr_un data;
|
||||||
data.sun_family = AF_UNIX;
|
data.sun_family = AF_UNIX;
|
||||||
data.sun_path[0] = 0;
|
data.sun_path[0] = 0;
|
||||||
strcpy(data.sun_path + 1, argv[1]);
|
strncpy(data.sun_path + 1, argv[1], sizeof(data.sun_path) - 2);
|
||||||
|
|
||||||
// Now try to connect, To ensure we work no matter what order we are
|
// Now try to connect, To ensure we work no matter what order we are
|
||||||
// executed in, just busyloop here.
|
// executed in, just busyloop here.
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue