}
int memfd_get_sealed(int fd) {
- unsigned int seals;
+ unsigned seals;
int r;
r = memfd_get_seals(fd, &seals);
enum nss_status _nss_##module##_initgroups_dyn( \
const char *user, \
gid_t group, \
- long int *start, \
- long int *size, \
+ long *start, \
+ long *size, \
gid_t **groupsp, \
- long int limit, \
+ long limit, \
int *errnop) _public_;
typedef enum nss_status (*_nss_gethostbyname4_r_t)(
return 0;
}
-int safe_atolli(const char *s, long long int *ret_lli) {
+int safe_atolli(const char *s, long long *ret_lli) {
unsigned base = 0;
char *x = NULL;
long long l;
int safe_atou_bounded(const char *s, unsigned min, unsigned max, unsigned *ret);
int safe_atoi(const char *s, int *ret_i);
-int safe_atolli(const char *s, long long int *ret_i);
+int safe_atolli(const char *s, long long *ret_i);
int safe_atou8_full(const char *s, unsigned base, uint8_t *ret);
}
static inline int safe_atoi64(const char *s, int64_t *ret_i) {
- assert_cc(sizeof(int64_t) == sizeof(long long int));
- return safe_atolli(s, (long long int*) ret_i);
+ assert_cc(sizeof(int64_t) == sizeof(long long));
+ return safe_atolli(s, (long long*) ret_i);
}
static inline int safe_atoux64(const char *s, uint64_t *ret) {
assert_cc(sizeof(unsigned long) == sizeof(unsigned));
return safe_atou_full(s, base, (unsigned*) ret_u);
}
-static inline int safe_atoli(const char *s, long int *ret_u) {
- assert_cc(sizeof(long int) == sizeof(int));
+static inline int safe_atoli(const char *s, long *ret_u) {
+ assert_cc(sizeof(long) == sizeof(int));
return safe_atoi(s, (int*) ret_u);
}
#else
assert_cc(sizeof(unsigned long) == sizeof(unsigned long long));
return safe_atollu_full(s, base, (unsigned long long*) ret_u);
}
-static inline int safe_atoli(const char *s, long int *ret_u) {
- assert_cc(sizeof(long int) == sizeof(long long int));
- return safe_atolli(s, (long long int*) ret_u);
+static inline int safe_atoli(const char *s, long *ret_u) {
+ assert_cc(sizeof(long) == sizeof(long long));
+ return safe_atolli(s, (long long*) ret_u);
}
#endif
#include <stdint.h>
struct super_block {
- unsigned long int s_magic;
+ unsigned long s_magic;
} __attribute__((preserve_access_index));
struct inode {
if (r < 0)
return r;
} else if ((val = startswith(l, "exec-context-syscall-archs="))) {
- unsigned int id;
+ unsigned id;
r = safe_atou(val, &id);
if (r < 0)
}
SEC("lsm/path_mknod")
-int BPF_PROG(userns_restrict_path_mknod, const struct path *dir, struct dentry *dentry, umode_t mode, unsigned int dev, int ret) {
+int BPF_PROG(userns_restrict_path_mknod, const struct path *dir, struct dentry *dentry, umode_t mode, unsigned dev, int ret) {
return validate_path(dir, ret);
}
Manager *m = ASSERT_PTR(userdata);
size_t n;
- if ((size % sizeof(unsigned int)) != 0) /* Not multiples of "unsigned int"? */
+ if ((size % sizeof(unsigned)) != 0) /* Not multiples of "unsigned"? */
return -EIO;
- n = size / sizeof(unsigned int);
+ n = size / sizeof(unsigned);
for (size_t i = 0; i < n; i++) {
const void *d;
uint64_t inode;
- d = (const uint8_t*) data + i * sizeof(unsigned int);
+ d = (const uint8_t*) data + i * sizeof(unsigned);
inode = unaligned_read_ne32(d);
log_debug("Got BPF ring buffer notification that user namespace %" PRIu64 " is now dead.", inode);
if (r < 0)
return log_error_errno(r, "Failed to size userns/mnt_id hash table: %m");
- r = sym_bpf_map__set_max_entries(obj->maps.userns_ringbuf, USERNS_MAX * sizeof(unsigned int));
+ r = sym_bpf_map__set_max_entries(obj->maps.userns_ringbuf, USERNS_MAX * sizeof(unsigned));
if (r < 0)
return log_error_errno(r, "Failed to size userns ring buffer: %m");
long *start,
long *size,
gid_t **groupsp,
- long int limit,
+ long limit,
int *errnop) {
_cleanup_(userdb_iterator_freep) UserDBIterator *iterator = NULL;
.sp_namp = buffer,
.sp_lstchg = hr->last_password_change_usec == 0 ? 1 : /* map 0 to 1, since 0 means please change password on next login */
hr->last_password_change_usec == UINT64_MAX ? -1 :
- (long int) (hr->last_password_change_usec / USEC_PER_DAY),
- .sp_min = hr->password_change_min_usec != UINT64_MAX ? (long int) (hr->password_change_min_usec / USEC_PER_DAY) : -1,
- .sp_max = hr->password_change_max_usec != UINT64_MAX ? (long int) (hr->password_change_max_usec / USEC_PER_DAY) : -1,
- .sp_warn = hr->password_change_warn_usec != UINT64_MAX ? (long int) (hr->password_change_warn_usec / USEC_PER_DAY) : -1,
- .sp_inact = hr->password_change_inactive_usec != UINT64_MAX ? (long int) (hr->password_change_inactive_usec / USEC_PER_DAY) : -1,
+ (long) (hr->last_password_change_usec / USEC_PER_DAY),
+ .sp_min = hr->password_change_min_usec != UINT64_MAX ? (long) (hr->password_change_min_usec / USEC_PER_DAY) : -1,
+ .sp_max = hr->password_change_max_usec != UINT64_MAX ? (long) (hr->password_change_max_usec / USEC_PER_DAY) : -1,
+ .sp_warn = hr->password_change_warn_usec != UINT64_MAX ? (long) (hr->password_change_warn_usec / USEC_PER_DAY) : -1,
+ .sp_inact = hr->password_change_inactive_usec != UINT64_MAX ? (long) (hr->password_change_inactive_usec / USEC_PER_DAY) : -1,
.sp_expire = hr->locked > 0 || hr->not_after_usec == 0 ? 1 : /* already expired/locked */
hr->not_after_usec == UINT64_MAX ? -1 :
- (long int) (hr->not_after_usec / USEC_PER_DAY),
+ (long) (hr->not_after_usec / USEC_PER_DAY),
.sp_flag = ULONG_MAX,
};
static int nft_message_append_setelem_iprange(
sd_netlink_message *m,
const union in_addr_union *source,
- unsigned int prefixlen) {
+ unsigned prefixlen) {
uint32_t mask, start, end;
- unsigned int nplen;
+ unsigned nplen;
int r;
assert(m);
static int nft_message_append_setelem_ip6range(
sd_netlink_message *m,
const union in_addr_union *source,
- unsigned int prefixlen) {
+ unsigned prefixlen) {
union in_addr_union start, end;
int r;
const char *table,
const char *set,
const union in_addr_union *source,
- unsigned int source_prefixlen) {
+ unsigned source_prefixlen) {
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *m = NULL;
int r;
bool add,
int af,
const union in_addr_union *source,
- unsigned int source_prefixlen) {
+ unsigned source_prefixlen) {
int r;
const char *table,
const char *set,
const union in_addr_union *source,
- unsigned int source_prefixlen);
+ unsigned source_prefixlen);
int nft_set_element_modify_ip(
FirewallContext *ctx,
if (!buf)
return log_oom_debug();
- unsigned int size;
+ unsigned size;
if (!EVP_DigestFinal_ex(ctx, buf, &size))
return log_openssl_errors("Failed to finalize Digest");
size_t size;
if (!EVP_MAC_final(ctx, buf, &size, digest_size))
#else
- unsigned int size;
+ unsigned size;
if (!HMAC_Final(ctx, buf, &size))
#endif
return log_openssl_errors("Failed to finalize HMAC");
}
}
-static void write_qrcode(FILE *output, QRcode *qr, unsigned int row, unsigned int column) {
+static void write_qrcode(FILE *output, QRcode *qr, unsigned row, unsigned column) {
assert(qr);
if (!output)
log_struct(LOG_INFO,
LOG_MESSAGE("Foobar PID="PID_FMT, getpid_cached()),
LOG_ITEM("FORMAT_STR_TEST=1=%i A=%c 2=%hi 3=%li 4=%lli 1=%p foo=%s 2.5=%g 3.5=%g 4.5=%Lg",
- (int) 1, 'A', (short) 2, (long int) 3, (long long int) 4, (void*) 1, "foo", (float) 2.5f, (double) 3.5, (long double) 4.5),
+ (int) 1, 'A', (short) 2, (long) 3, (long long) 4, (void*) 1, "foo", (float) 2.5f, (double) 3.5, (long double) 4.5),
LOG_ITEM("SUFFIX=GOT IT"));
}
* libinput uses similar heuristics, any changes here should be added to libinput too.
*/
if (is_joystick) {
- static const unsigned int well_known_keyboard_keys[] = {
+ static const unsigned well_known_keyboard_keys[] = {
KEY_LEFTCTRL, KEY_CAPSLOCK, KEY_NUMLOCK, KEY_INSERT,
KEY_MUTE, KEY_CALC, KEY_FILE, KEY_MAIL, KEY_PLAYPAUSE,
KEY_BRIGHTNESSDOWN,