Merge pull request #30622 from yuwata/space
tree-wide: drop unnecessary space or insert missing space
This commit is contained in:
+2
-2
@@ -163,9 +163,9 @@ bool bitmap_iterate(const Bitmap *b, Iterator *i, unsigned *n) {
|
||||
rem = BITMAP_NUM_TO_REM(i->idx);
|
||||
bitmask = UINT64_C(1) << rem;
|
||||
|
||||
for (; offset < b->n_bitmaps; offset ++) {
|
||||
for (; offset < b->n_bitmaps; offset++) {
|
||||
if (b->bitmaps[offset]) {
|
||||
for (; bitmask; bitmask <<= 1, rem ++) {
|
||||
for (; bitmask; bitmask <<= 1, rem++) {
|
||||
if (b->bitmaps[offset] & bitmask) {
|
||||
*n = BITMAP_OFFSET_TO_NUM(offset, rem);
|
||||
i->idx = *n + 1;
|
||||
|
||||
@@ -40,7 +40,7 @@ CompareOperator parse_compare_operator(const char **s, CompareOperatorParseFlags
|
||||
* parse_compare_operator() are use on the same string? */
|
||||
return _COMPARE_OPERATOR_INVALID;
|
||||
|
||||
for (size_t i = 0; i < ELEMENTSOF(table); i ++) {
|
||||
for (size_t i = 0; i < ELEMENTSOF(table); i++) {
|
||||
const char *e;
|
||||
|
||||
if (table[i].need_mask != 0 && !FLAGS_SET(flags, table[i].need_mask))
|
||||
|
||||
@@ -150,7 +150,7 @@ int acquire_fido2_key_auto(
|
||||
|
||||
/* Loads FIDO2 metadata from LUKS2 JSON token headers. */
|
||||
|
||||
for (int token = 0; token < sym_crypt_token_max(CRYPT_LUKS2); token ++) {
|
||||
for (int token = 0; token < sym_crypt_token_max(CRYPT_LUKS2); token++) {
|
||||
_cleanup_(json_variant_unrefp) JsonVariant *v = NULL;
|
||||
JsonVariant *w;
|
||||
_cleanup_free_ void *salt = NULL;
|
||||
|
||||
@@ -3396,7 +3396,7 @@ int dissected_image_acquire_metadata(DissectedImage *m, DissectImageFlags extra_
|
||||
|
||||
assert(m);
|
||||
|
||||
for (; n_meta_initialized < _META_MAX; n_meta_initialized ++) {
|
||||
for (; n_meta_initialized < _META_MAX; n_meta_initialized++) {
|
||||
assert(paths[n_meta_initialized]);
|
||||
|
||||
if (pipe2(fds + 2*n_meta_initialized, O_CLOEXEC) < 0) {
|
||||
|
||||
+1
-1
@@ -246,7 +246,7 @@ int fdset_new_listen_fds(FDSet **ret, bool unset) {
|
||||
return -ENOMEM;
|
||||
|
||||
n = sd_listen_fds(unset);
|
||||
for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + n; fd ++) {
|
||||
for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + n; fd++) {
|
||||
r = fdset_put(s, fd);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
@@ -43,7 +43,7 @@ typedef enum NFTSetSource {
|
||||
NFT_SET_SOURCE_GROUP,
|
||||
_NFT_SET_SOURCE_MAX,
|
||||
_NFT_SET_SOURCE_INVALID = -EINVAL,
|
||||
} NFTSetSource;
|
||||
} NFTSetSource;
|
||||
|
||||
typedef struct NFTSet {
|
||||
NFTSetSource source;
|
||||
|
||||
@@ -2632,7 +2632,7 @@ int table_print(Table *t, FILE *f) {
|
||||
}
|
||||
|
||||
fputc('\n', f);
|
||||
n_subline ++;
|
||||
n_subline++;
|
||||
} while (more_sublines);
|
||||
}
|
||||
|
||||
|
||||
@@ -226,9 +226,9 @@ int fstab_filter_options(
|
||||
if (IN_SET(*end, ',', '\0'))
|
||||
break;
|
||||
assert(*end == '\\');
|
||||
end ++; /* Skip the backslash */
|
||||
end++; /* Skip the backslash */
|
||||
if (*end != '\0')
|
||||
end ++; /* Skip the escaped char, but watch out for a trailing comma */
|
||||
end++; /* Skip the escaped char, but watch out for a trailing comma */
|
||||
}
|
||||
|
||||
NULSTR_FOREACH(name, names) {
|
||||
|
||||
@@ -484,7 +484,7 @@ static int import_file(struct trie *trie, const char *filename, uint16_t file_pr
|
||||
if (r == 0)
|
||||
break;
|
||||
|
||||
line_number ++;
|
||||
line_number++;
|
||||
|
||||
/* comment line */
|
||||
if (line[0] == '#')
|
||||
|
||||
@@ -1810,7 +1810,7 @@ int unit_file_verify_alias(
|
||||
_cleanup_free_ char *dir = NULL;
|
||||
char *p;
|
||||
|
||||
path_alias ++; /* skip over slash */
|
||||
path_alias++; /* skip over slash */
|
||||
|
||||
r = path_extract_directory(dst, &dir);
|
||||
if (r < 0)
|
||||
|
||||
+5
-5
@@ -559,7 +559,7 @@ static int _json_variant_array_put_element(JsonVariant *array, JsonVariant *elem
|
||||
return -ELNRNG;
|
||||
if (d >= array->depth)
|
||||
array->depth = d + 1;
|
||||
array->n_elements ++;
|
||||
array->n_elements++;
|
||||
|
||||
*w = (JsonVariant) {
|
||||
.is_embedded = true,
|
||||
@@ -2310,7 +2310,7 @@ static int json_variant_copy(JsonVariant **nv, JsonVariant *v) {
|
||||
source = json_variant_string(v);
|
||||
k = strnlen(source, INLINE_STRING_MAX + 1);
|
||||
if (k <= INLINE_STRING_MAX) {
|
||||
k ++;
|
||||
k++;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2594,7 +2594,7 @@ static int json_parse_string(const char **p, char **ret) {
|
||||
return -ENOMEM;
|
||||
|
||||
s[n++] = ch;
|
||||
c ++;
|
||||
c++;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -4574,7 +4574,7 @@ int json_dispatch_full(
|
||||
}
|
||||
}
|
||||
|
||||
done ++;
|
||||
done++;
|
||||
|
||||
} else { /* Didn't find a matching entry! ☹️ */
|
||||
|
||||
@@ -4589,7 +4589,7 @@ int json_dispatch_full(
|
||||
|
||||
return r;
|
||||
} else
|
||||
done ++;
|
||||
done++;
|
||||
|
||||
} else {
|
||||
json_log(value, flags, 0, "Unexpected object field '%s'.", json_variant_string(key));
|
||||
|
||||
@@ -574,7 +574,7 @@ static int fido2_use_hmac_hash_specific_token(
|
||||
|
||||
/* COSE_ECDH_ES256 is not usable with fido_cred_set_type() thus it's not listed here. */
|
||||
static const char *fido2_algorithm_to_string(int alg) {
|
||||
switch(alg) {
|
||||
switch (alg) {
|
||||
case COSE_ES256:
|
||||
return "es256";
|
||||
case COSE_RS256:
|
||||
|
||||
@@ -60,7 +60,7 @@ static int start_loopback(sd_netlink *rtnl, struct state *s) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
s->n_messages ++;
|
||||
s->n_messages++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ static int add_ipv4_address(sd_netlink *rtnl, struct state *s) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
s->n_messages ++;
|
||||
s->n_messages++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ static int add_ipv6_address(sd_netlink *rtnl, struct state *s) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
s->n_messages ++;
|
||||
s->n_messages++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ bool mount_point_is_api(const char *path) {
|
||||
/* Checks if this mount point is considered "API", and hence
|
||||
* should be ignored */
|
||||
|
||||
for (size_t i = 0; i < ELEMENTSOF(mount_table); i ++)
|
||||
for (size_t i = 0; i < ELEMENTSOF(mount_table); i++)
|
||||
if (path_equal(path, mount_table[i].where))
|
||||
return true;
|
||||
|
||||
|
||||
+1
-1
@@ -326,7 +326,7 @@ static int rm_rf_children_impl(
|
||||
dirname = mfree(dirname);
|
||||
|
||||
/* And now let's back out one level up */
|
||||
n_todo --;
|
||||
n_todo--;
|
||||
d = TAKE_PTR(todos[n_todo].dir);
|
||||
dirname = TAKE_PTR(todos[n_todo].dirname);
|
||||
old_mode = todos[n_todo].old_mode;
|
||||
|
||||
@@ -401,7 +401,7 @@ static int varlink_interface_realloc(VarlinkInterface **interface, size_t n_symb
|
||||
|
||||
assert(interface);
|
||||
|
||||
n_symbols ++; /* Space for trailing NULL end marker symbol */
|
||||
n_symbols++; /* Space for trailing NULL end marker symbol */
|
||||
|
||||
/* Overflow check */
|
||||
if (n_symbols > (SIZE_MAX - offsetof(VarlinkInterface, symbols)) / sizeof(VarlinkSymbol*))
|
||||
@@ -420,7 +420,7 @@ static int varlink_symbol_realloc(VarlinkSymbol **symbol, size_t n_fields) {
|
||||
|
||||
assert(symbol);
|
||||
|
||||
n_fields ++; /* Space for trailing end marker field */
|
||||
n_fields++; /* Space for trailing end marker field */
|
||||
|
||||
/* Overflow check */
|
||||
if (n_fields > (SIZE_MAX - offsetof(VarlinkSymbol, fields)) / sizeof(VarlinkField))
|
||||
|
||||
Reference in New Issue
Block a user