return -1;
}
-void safe_close_pair(int p[]) {
+void safe_close_pair(int p[static 2]) {
assert(p);
if (p[0] == p[1]) {
int close_nointr(int fd);
int safe_close(int fd);
-void safe_close_pair(int p[]);
+void safe_close_pair(int p[static 2]);
static inline int safe_close_above_stdio(int fd) {
if (fd < 3) /* Don't close stdin/stdout/stderr, but still invalidate the fd by returning -1 */
state->v2 = rotate_left(state->v2, 32);
}
-void siphash24_init(struct siphash *state, const uint8_t k[16]) {
+void siphash24_init(struct siphash *state, const uint8_t k[static 16]) {
uint64_t k0, k1;
assert(state);
return state->v0 ^ state->v1 ^ state->v2 ^ state->v3;
}
-uint64_t siphash24(const void *in, size_t inlen, const uint8_t k[16]) {
+uint64_t siphash24(const void *in, size_t inlen, const uint8_t k[static 16]) {
struct siphash state;
assert(in);
size_t inlen;
};
-void siphash24_init(struct siphash *state, const uint8_t k[16]);
+void siphash24_init(struct siphash *state, const uint8_t k[static 16]);
void siphash24_compress(const void *in, size_t inlen, struct siphash *state);
#define siphash24_compress_byte(byte, state) siphash24_compress((const uint8_t[]) { (byte) }, 1, (state))
uint64_t siphash24_finalize(struct siphash *state);
-uint64_t siphash24(const void *in, size_t inlen, const uint8_t k[16]);
+uint64_t siphash24(const void *in, size_t inlen, const uint8_t k[static 16]);
-static inline uint64_t siphash24_string(const char *s, const uint8_t k[16]) {
+static inline uint64_t siphash24_string(const char *s, const uint8_t k[static 16]) {
return siphash24(s, strlen(s) + 1, k);
}
return ret;
}
-static void advance_offsets(ssize_t diff, size_t offsets[2], size_t shift[2], size_t size) {
+static void advance_offsets(ssize_t diff, size_t offsets[static 2], size_t shift[static 2], size_t size) {
if (!offsets)
return;
#include "util.h"
-EFI_STATUS disk_get_part_uuid(EFI_HANDLE *handle, CHAR16 uuid[37]) {
+EFI_STATUS disk_get_part_uuid(EFI_HANDLE *handle, CHAR16 uuid[static 37]) {
EFI_DEVICE_PATH *device_path;
/* export the device path this image is started from */
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
-EFI_STATUS disk_get_part_uuid(EFI_HANDLE *handle, CHAR16 uuid[37]);
+EFI_STATUS disk_get_part_uuid(EFI_HANDLE *handle, CHAR16 uuid[static 37]);
return mfree(d);
}
-static int dynamic_user_add(Manager *m, const char *name, int storage_socket[2], DynamicUser **ret) {
+static int dynamic_user_add(Manager *m, const char *name, int storage_socket[static 2], DynamicUser **ret) {
DynamicUser *d;
int r;
#endif
-static void do_idle_pipe_dance(int idle_pipe[4]) {
+static void do_idle_pipe_dance(int idle_pipe[static 4]) {
assert(idle_pipe);
idle_pipe[1] = safe_close(idle_pipe[1]);
return r;
}
-static void append_socket_pair(int *array, size_t *n, const int pair[2]) {
+static void append_socket_pair(int *array, size_t *n, const int pair[static 2]) {
assert(array);
assert(n);
}
}
-static int exec_context_named_iofds(const ExecContext *c, const ExecParameters *p, int named_iofds[3]) {
+static int exec_context_named_iofds(const ExecContext *c, const ExecParameters *p, int named_iofds[static 3]) {
size_t i, targets;
const char* stdio_fdname[3];
size_t n_fds;
return 0;
}
-int setup_netns(int netns_storage_socket[2]) {
+int setup_netns(int netns_storage_socket[static 2]) {
_cleanup_close_ int netns = -1;
int r, q;
char **tmp_dir,
char **var_tmp_dir);
-int setup_netns(int netns_storage_socket[2]);
+int setup_netns(int netns_storage_socket[static 2]);
const char* protect_home_to_string(ProtectHome p) _const_;
ProtectHome protect_home_from_string(const char *s) _pure_;
return efi_set_variable(EFI_VENDOR_GLOBAL, "BootOrder", order, n * sizeof(uint16_t));
}
-static int boot_id_hex(const char s[4]) {
+static int boot_id_hex(const char s[static 4]) {
int id = 0, i;
for (i = 0; i < 4; i++)
sd_resolve_unref(context->resolve);
}
-static int connection_create_pipes(Connection *c, int buffer[2], size_t *sz) {
+static int connection_create_pipes(Connection *c, int buffer[static 2], size_t *sz) {
int r;
assert(c);