systemd: merge branch systemd into master

This commit is contained in:
Thomas Haller 2021-01-05 09:27:41 +01:00
commit 6bdda3a923
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
3 changed files with 12 additions and 6 deletions

View file

@ -5,9 +5,9 @@
#include <inttypes.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <sys/types.h>
#include "string-util.h"
#include "time-util.h"
#if 0 /* NM_IGNORED */
@ -63,11 +63,15 @@ static inline void siphash24_compress_usec_t(usec_t in, struct siphash *state) {
siphash24_compress(&in, sizeof in, state);
}
static inline void siphash24_compress_string(const char *in, struct siphash *state) {
if (!in)
static inline void siphash24_compress_safe(const void *in, size_t inlen, struct siphash *state) {
if (inlen == 0)
return;
siphash24_compress(in, strlen(in), state);
siphash24_compress(in, inlen, state);
}
static inline void siphash24_compress_string(const char *in, struct siphash *state) {
siphash24_compress_safe(in, strlen_ptr(in), state);
}
uint64_t siphash24_finalize(struct siphash *state);

View file

@ -1289,7 +1289,7 @@ int dns_name_apply_idna(const char *name, char **ret) {
int r;
r = dlopen_idn();
if (r == EOPNOTSUPP) {
if (r == -EOPNOTSUPP) {
*ret = NULL;
return 0;
}

View file

@ -1278,9 +1278,11 @@ static int client_timeout_resend(
break;
case DHCP_STATE_STOPPED:
default:
r = -EINVAL;
goto error;
default:
assert_not_reached("Unhandled choice");
}
r = event_reset_time(client->event, &client->timeout_resend,