1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 02:21:16 +02:00

Merge pull request #12765 from Mic92/clan-tidy-cleanups

Add various clang tidy fixes
This commit is contained in:
Robert Hensing 2025-04-01 15:36:50 +02:00 committed by GitHub
commit 4de73df8bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 5 additions and 3 deletions

View file

@ -19,7 +19,7 @@ int main(int argc, char **argv) {
struct sockaddr_un data;
data.sun_family = AF_UNIX;
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
// executed in, just busyloop here.

View file

@ -5,6 +5,7 @@
#include <stdio.h>
#include <unistd.h>
#include <assert.h>
#include <string.h>
int main(int argc, char **argv) {