1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 14:55:37 +03:00

Merge pull request #19552 from yuwata/fix-typo-and-coverty-issues

Fix typo and coverity issues
This commit is contained in:
Luca Boccassi 2021-05-09 13:36:17 +01:00 committed by GitHub
commit 84b5f40821
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 8 deletions

View File

@ -190,7 +190,7 @@ int get_process_cmdline(pid_t pid, size_t max_columns, ProcessCmdlineFlags flags
assert(line);
assert(pid >= 0);
/* Retrieve adn format a commandline. See above for discussion of retrieval options.
/* Retrieve and format a commandline. See above for discussion of retrieval options.
*
* There are two main formatting modes:
*

View File

@ -1082,7 +1082,7 @@ static int server_receive_message(sd_event_source *s, int fd,
size_t buflen = datagram_size;
if (sd_dhcp_server_is_in_relay_mode(server))
/* Preallocate the additional size for DHCP Relay Agent Information Option if neeeded */
/* Preallocate the additional size for DHCP Relay Agent Information Option if needed */
buflen += relay_agent_information_length(server->agent_circuit_id, server->agent_remote_id) + 2;
message = malloc(buflen);

View File

@ -112,7 +112,7 @@ typedef enum DissectImageFlags {
DISSECT_IMAGE_READ_ONLY = DISSECT_IMAGE_DEVICE_READ_ONLY |
DISSECT_IMAGE_MOUNT_READ_ONLY,
DISSECT_IMAGE_GROWFS = 1 << 18, /* Grow file systems in partitions marked for that to the size of the partitions after mount */
DISSECT_IMAGE_MOUNT_IDMAPPED = 1 << 19, /* Mount mounts with kernel 5.12-style userns ID mapping, if file sytem type doesn't support uid=/gid= */
DISSECT_IMAGE_MOUNT_IDMAPPED = 1 << 19, /* Mount mounts with kernel 5.12-style userns ID mapping, if file system type doesn't support uid=/gid= */
} DissectImageFlags;
struct DissectedImage {

View File

@ -29,6 +29,7 @@ static void test_strbuf(void) {
/* check the content of the buffer directly */
l = strv_parse_nulstr(sb->buf, sb->len);
assert_se(l);
assert_se(streq(l[0], "")); /* root */
assert_se(streq(l[1], "waldo"));

View File

@ -393,13 +393,10 @@ static int vl_method_get_memberships(Varlink *link, JsonVariant *parameters, Var
JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(last_group_name))));
if (r < 0)
return r;
free(last_user_name);
free(last_group_name);
}
last_user_name = TAKE_PTR(user_name);
last_group_name = TAKE_PTR(group_name);
free_and_replace(last_user_name, user_name);
free_and_replace(last_group_name, group_name);
}
if (!last_user_name) {