Let the compiler perform inlining (see #11397).
}
#define bucket_hash(h, p) base_bucket_hash(HASHMAP_BASE(h), p)
-static inline void base_set_dirty(HashmapBase *h) {
+static void base_set_dirty(HashmapBase *h) {
h->dirty = true;
}
#define hashmap_set_dirty(h) base_set_dirty(HASHMAP_BASE(h))
#include "siphash24.h"
#include "unaligned.h"
-static inline uint64_t rotate_left(uint64_t x, uint8_t b) {
+static uint64_t rotate_left(uint64_t x, uint8_t b) {
assert(b < 64);
return (x << b) | (x >> (64 - b));
}
-static inline void sipround(struct siphash *state) {
+static void sipround(struct siphash *state) {
assert(state);
state->v0 += state->v1;
return uid_to_name(getuid());
}
-static inline bool is_nologin_shell(const char *shell) {
+static bool is_nologin_shell(const char *shell) {
return PATH_IN_SET(shell,
/* 'nologin' is the friendliest way to disable logins for a user account. It prints a nice
#ifdef __x86_64__
typedef VOID(*handover_f)(VOID *image, EFI_SYSTEM_TABLE *table, struct SetupHeader *setup);
-static inline VOID linux_efi_handover(EFI_HANDLE image, struct SetupHeader *setup) {
+static VOID linux_efi_handover(EFI_HANDLE image, struct SetupHeader *setup) {
handover_f handover;
asm volatile ("cli");
}
#else
typedef VOID(*handover_f)(VOID *image, EFI_SYSTEM_TABLE *table, struct SetupHeader *setup) __attribute__((regparm(0)));
-static inline VOID linux_efi_handover(EFI_HANDLE image, struct SetupHeader *setup) {
+static VOID linux_efi_handover(EFI_HANDLE image, struct SetupHeader *setup) {
handover_f handover;
handover = (handover_f)((UINTN)setup->code32_start + setup->handover_offset);
int ioctl_fd;
};
-static inline void expire_data_free(struct expire_data *data) {
+static void expire_data_free(struct expire_data *data) {
if (!data)
return;
SD_BUS_VTABLE_END
};
-static inline bool check_size_t_truncation(uint64_t t) {
+static bool check_size_t_truncation(uint64_t t) {
return (size_t) t == t;
}
-static inline const char* socket_protocol_to_string(int32_t i) {
+static const char* socket_protocol_to_string(int32_t i) {
if (i == IPPROTO_IP)
return "";
CONFIG_PARSE_WARN, NULL);
}
-static inline uint64_t storage_size_max(void) {
+static uint64_t storage_size_max(void) {
if (arg_storage == COREDUMP_STORAGE_EXTERNAL)
return arg_external_size_max;
if (arg_storage == COREDUMP_STORAGE_JOURNAL)
#define filename_escape(s) xescape((s), "./ ")
-static inline const char *coredump_tmpfile_name(const char *s) {
+static const char *coredump_tmpfile_name(const char *s) {
return s ? s : "(unnamed temporary file)";
}
assert_not_reached("WTF?");
}
-static inline void check_update_watchdog(Uploader *u) {
+static void check_update_watchdog(Uploader *u) {
usec_t after;
usec_t elapsed_time;
return 0;
}
-static inline void gnutls_x509_crt_deinitp(gnutls_x509_crt_t *p) {
+static void gnutls_x509_crt_deinitp(gnutls_x509_crt_t *p) {
gnutls_x509_crt_deinit(*p);
}
free(w);
}
-_pure_ static inline bool window_matches(Window *w, int prot, uint64_t offset, size_t size) {
+_pure_ static bool window_matches(Window *w, int prot, uint64_t offset, size_t size) {
assert(w);
assert(size > 0);
* ` BUS_MATCH_LEAF: E
*/
-static inline bool BUS_MATCH_IS_COMPARE(enum bus_match_node_type t) {
+static bool BUS_MATCH_IS_COMPARE(enum bus_match_node_type t) {
return t >= BUS_MATCH_SENDER && t <= BUS_MATCH_ARG_HAS_LAST;
}
-static inline bool BUS_MATCH_CAN_HASH(enum bus_match_node_type t) {
+static bool BUS_MATCH_CAN_HASH(enum bus_match_node_type t) {
return (t >= BUS_MATCH_MESSAGE_TYPE && t <= BUS_MATCH_PATH) ||
(t >= BUS_MATCH_ARG && t <= BUS_MATCH_ARG_LAST) ||
(t >= BUS_MATCH_ARG_HAS && t <= BUS_MATCH_ARG_HAS_LAST);
return nr;
}
-static inline int MONITOR_TO_FD(sd_login_monitor *m) {
+static int MONITOR_TO_FD(sd_login_monitor *m) {
return (int) (unsigned long) m - 1;
}
-static inline sd_login_monitor* FD_TO_MONITOR(int fd) {
+static sd_login_monitor* FD_TO_MONITOR(int fd) {
return (sd_login_monitor*) (unsigned long) (fd + 1);
}
return network_link_get_ifindexes(ifindex, "CARRIER_BOUND_BY", ret);
}
-static inline int MONITOR_TO_FD(sd_network_monitor *m) {
+static int MONITOR_TO_FD(sd_network_monitor *m) {
return (int) (unsigned long) m - 1;
}
-static inline sd_network_monitor* FD_TO_MONITOR(int fd) {
+static sd_network_monitor* FD_TO_MONITOR(int fd) {
return (sd_network_monitor*) (unsigned long) (fd + 1);
}
}
/* return list entry which embeds this node */
-static inline struct udev_list_entry *list_node_to_entry(struct udev_list_node *node) {
+static struct udev_list_entry *list_node_to_entry(struct udev_list_node *node) {
return container_of(node, struct udev_list_entry, node);
}
return scope & (1 << bit);
}
-static inline void set_bit(unsigned nr, uint32_t *addr) {
+static void set_bit(unsigned nr, uint32_t *addr) {
if (nr < BRIDGE_VLAN_BITMAP_MAX)
addr[nr / 32] |= (((uint32_t) 1) << (nr % 32));
}
/* Recheck /etc/hosts at most once every 2s */
#define ETC_HOSTS_RECHECK_USEC (2*USEC_PER_SEC)
-static inline void etc_hosts_item_free(EtcHostsItem *item) {
+static void etc_hosts_item_free(EtcHostsItem *item) {
strv_free(item->names);
free(item);
}
-static inline void etc_hosts_item_by_name_free(EtcHostsItemByName *item) {
+static void etc_hosts_item_by_name_free(EtcHostsItemByName *item) {
free(item->name);
free(item->addresses);
free(item);
DEFINE_BUS_APPEND_PARSE_PTR("u", uint32_t, unsigned, safe_atou);
DEFINE_BUS_APPEND_PARSE_PTR("x", int64_t, int64_t, safe_atoi64);
-static inline int bus_append_string(sd_bus_message *m, const char *field, const char *eq) {
+static int bus_append_string(sd_bus_message *m, const char *field, const char *eq) {
int r;
r = sd_bus_message_append(m, "(sv)", field, "s", eq);
size_t n_rules;
} Presets;
-static inline bool unit_file_install_info_has_rules(const UnitFileInstallInfo *i) {
+static bool unit_file_install_info_has_rules(const UnitFileInstallInfo *i) {
assert(i);
return !strv_isempty(i->aliases) ||
!strv_isempty(i->required_by);
}
-static inline bool unit_file_install_info_has_also(const UnitFileInstallInfo *i) {
+static bool unit_file_install_info_has_also(const UnitFileInstallInfo *i) {
assert(i);
return !strv_isempty(i->also);
}
-static inline void presets_freep(Presets *p) {
+static void presets_freep(Presets *p) {
size_t i;
if (!p)
{ KEY_ALS_TOGGLE, BTN_TRIGGER_HAPPY }
};
-static inline int abs_size_mm(const struct input_absinfo *absinfo) {
+static int abs_size_mm(const struct input_absinfo *absinfo) {
/* Resolution is defined to be in units/mm for ABS_X/Y */
return (absinfo->maximum - absinfo->minimum) / absinfo->resolution;
}
return 0;
}
-static inline char* parse_token(const char *current, int32_t *val_out) {
+static char* parse_token(const char *current, int32_t *val_out) {
char *next;
int32_t val;
dump_token(rules, &rules->tokens[i]);
}
#else
-static inline void dump_token(UdevRules *rules, struct token *token) {}
-static inline void dump_rules(UdevRules *rules) {}
+static void dump_token(UdevRules *rules, struct token *token) {}
+static void dump_rules(UdevRules *rules) {}
#endif /* ENABLE_DEBUG_UDEV */
static int add_token(UdevRules *rules, struct token *token) {