tree-wide: some more [static] related fixes

let's add [static] where it was missing so far

Drop [static] on parameters that can be NULL.

Add an assert() around parameters that have [static] and can't be NULL
hence.

Add some "const" where it was forgotten.
This commit is contained in:
Lennart Poettering
2019-07-12 16:40:10 +02:00
parent 6fb0569065
commit 2caa38e99f
10 changed files with 30 additions and 12 deletions
+2
View File
@@ -899,6 +899,8 @@ static int wireguard_read_key_file(const char *filename, uint8_t dest[static WG_
if (!filename)
return 0;
assert(dest);
r = read_full_file_full(filename, READ_FULL_FILE_SECURE | READ_FULL_FILE_UNBASE64, &key, &key_len);
if (r < 0)
return r;