Merge pull request #33804 from keszybz/assorted-cleanups

Assorted cleanups
This commit is contained in:
Luca Boccassi
2024-07-23 10:38:08 +01:00
committed by GitHub
6 changed files with 11 additions and 11 deletions
+3 -3
View File
@@ -558,7 +558,7 @@ static Partition* partition_unlink_and_free(Context *context, Partition *p) {
DEFINE_TRIVIAL_CLEANUP_FUNC(Partition*, partition_free);
static Context *context_new(sd_id128_t seed) {
static Context* context_new(sd_id128_t seed) {
Context *context;
context = new(Context, 1);
@@ -585,7 +585,7 @@ static void context_free_free_areas(Context *context) {
context->n_free_areas = 0;
}
static Context *context_free(Context *context) {
static Context* context_free(Context *context) {
if (!context)
return NULL;
@@ -3778,7 +3778,7 @@ static const char* partition_target_path(PartitionTarget *t) {
return t->path;
}
static PartitionTarget *partition_target_free(PartitionTarget *t) {
static PartitionTarget* partition_target_free(PartitionTarget *t) {
if (!t)
return NULL;
+2 -1
View File
@@ -29,7 +29,8 @@ int ask_password_agent_open(void) {
NULL, 0,
&agent_pid,
SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH,
SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH, "--watch", NULL);
SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH,
"--watch");
if (r < 0)
return log_error_errno(r, "Failed to fork TTY ask password agent: %m");
+1 -1
View File
@@ -531,7 +531,7 @@ int fexecve_or_execve(int executable_fd, const char *executable, char *const arg
return -errno;
}
int fork_agent(const char *name, const int except[], size_t n_except, pid_t *ret_pid, const char *path, ...) {
int _fork_agent(const char *name, const int except[], size_t n_except, pid_t *ret_pid, const char *path, ...) {
bool stdout_is_tty, stderr_is_tty;
size_t n, i;
va_list ap;
+2 -1
View File
@@ -61,4 +61,5 @@ ExecCommandFlags exec_command_flags_from_string(const char *s);
int fexecve_or_execve(int executable_fd, const char *executable, char *const argv[], char *const envp[]);
int fork_agent(const char *name, const int except[], size_t n_except, pid_t *ret_pid, const char *path, ...) _sentinel_;
int _fork_agent(const char *name, const int except[], size_t n_except, pid_t *ret_pid, const char *path, ...) _sentinel_;
#define fork_agent(name, ...) _fork_agent(name, __VA_ARGS__, NULL)
+2 -4
View File
@@ -48,10 +48,8 @@ int polkit_agent_open(void) {
&agent_pid,
POLKIT_AGENT_BINARY_PATH,
POLKIT_AGENT_BINARY_PATH,
"--notify-fd",
notify_fd,
"--fallback",
NULL);
"--notify-fd", notify_fd,
"--fallback");
/* Close the writing side, because that's the one for the agent */
safe_close(pipe_fd[1]);
+1 -1
View File
@@ -168,7 +168,7 @@ static int selinux_init(bool force) {
if (!force && initialized != LAZY_INITIALIZED)
return 1;
r = selinux_status_open(/* netlink fallback */ 1);
r = selinux_status_open(/* netlink fallback= */ 1);
if (r < 0) {
if (!ERRNO_IS_PRIVILEGE(errno))
return log_enforcing_errno(errno, "Failed to open SELinux status page: %m");