]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
coredump: drop unnecessary initialization
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 5 Jan 2022 10:41:42 +0000 (19:41 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 5 Jan 2022 10:41:42 +0000 (19:41 +0900)
src/coredump/coredump.c

index 3e38efe55298c69f03bf89e54c7cd5f437b30362..20503cfd3b7a6efd0c3aa1bdbabd95963cf39354 100644 (file)
@@ -701,10 +701,10 @@ static int get_mount_namespace_leader(pid_t pid, pid_t *ret) {
  * Returns a negative number on errors.
  */
 static int get_process_container_parent_cmdline(pid_t pid, char** cmdline) {
-        int r = 0;
         pid_t container_pid;
         const char *proc_root_path;
         struct stat root_stat, proc_root_stat;
+        int r;
 
         /* To compare inodes of / and /proc/[pid]/root */
         if (stat("/", &root_stat) < 0)
@@ -772,6 +772,7 @@ static int submit_coredump(
         bool truncated = false;
         JsonVariant *module_json;
         int r;
+
         assert(context);
         assert(iovw);
         assert(input_fd >= 0);