]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/linux-fork.c
Use gdb:array_view in call_function_by_hand & friends
[thirdparty/binutils-gdb.git] / gdb / linux-fork.c
index 74d5c195d255172b8e70e09dfdaa90e99647642e..0f87d97c6e388b2fa021cdeb5437aca825103b6b 100644 (file)
@@ -456,7 +456,7 @@ inferior_call_waitpid (ptid_t pptid, int pid)
 {
   struct objfile *waitpid_objf;
   struct value *waitpid_fn = NULL;
-  struct value *argv[4], *retv;
+  struct value *argv[3], *retv;
   struct gdbarch *gdbarch = get_current_arch ();
   struct fork_info *oldfp = NULL, *newfp = NULL;
   struct cleanup *old_cleanup;
@@ -490,9 +490,8 @@ inferior_call_waitpid (ptid_t pptid, int pid)
   argv[0] = value_from_longest (builtin_type (gdbarch)->builtin_int, pid);
   argv[1] = value_from_pointer (builtin_type (gdbarch)->builtin_data_ptr, 0);
   argv[2] = value_from_longest (builtin_type (gdbarch)->builtin_int, 0);
-  argv[3] = 0;
 
-  retv = call_function_by_hand (waitpid_fn, NULL, 3, argv);
+  retv = call_function_by_hand (waitpid_fn, NULL, argv);
   if (value_as_long (retv) < 0)
     goto out;
 
@@ -704,7 +703,7 @@ checkpoint_command (const char *args, int from_tty)
     scoped_restore save_pid
       = make_scoped_restore (&checkpointing_pid, inferior_ptid.pid ());
 
-    ret = call_function_by_hand (fork_fn, NULL, 0, &ret);
+    ret = call_function_by_hand (fork_fn, NULL, {});
   }
 
   if (!ret)    /* Probably can't happen.  */