diff options
Diffstat (limited to 'src/sysdep.c')
-rw-r--r-- | src/sysdep.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index 25f111ad0ed..836cc271b11 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -2719,10 +2719,8 @@ Lisp_Object list_system_processes (void) { Lisp_Object procdir, match, proclist, next; - struct gcpro gcpro1, gcpro2; - register Lisp_Object tail; + Lisp_Object tail; - GCPRO2 (procdir, match); /* For every process on the system, there's a directory in the "/proc" pseudo-directory whose name is the numeric ID of that process. */ @@ -2737,7 +2735,6 @@ list_system_processes (void) next = XCDR (tail); XSETCAR (tail, Fstring_to_number (XCAR (tail), Qnil)); } - UNGCPRO; /* directory_files_internal returns the files in reverse order; undo that. */ @@ -2759,7 +2756,6 @@ list_system_processes (void) struct kinfo_proc *procs; size_t i; - struct gcpro gcpro1; Lisp_Object proclist = Qnil; if (sysctl (mib, 3, NULL, &len, NULL, 0) != 0) @@ -2772,7 +2768,6 @@ list_system_processes (void) return proclist; } - GCPRO1 (proclist); len /= sizeof (struct kinfo_proc); for (i = 0; i < len; i++) { @@ -2782,7 +2777,6 @@ list_system_processes (void) proclist = Fcons (make_fixnum_or_float (procs[i].ki_pid), proclist); #endif } - UNGCPRO; xfree (procs); @@ -2993,7 +2987,6 @@ system_process_attributes (Lisp_Object pid) Lisp_Object attrs = Qnil; Lisp_Object cmd_str, decoded_cmd; ptrdiff_t count; - struct gcpro gcpro1, gcpro2; CHECK_NUMBER_OR_FLOAT (pid); CONS_TO_INTEGER (pid, pid_t, proc_id); @@ -3001,8 +2994,6 @@ system_process_attributes (Lisp_Object pid) if (stat (procfn, &st) < 0) return attrs; - GCPRO2 (attrs, decoded_cmd); - /* euid egid */ uid = st.st_uid; attrs = Fcons (Fcons (Qeuid, make_fixnum_or_float (uid)), attrs); @@ -3191,7 +3182,6 @@ system_process_attributes (Lisp_Object pid) attrs = Fcons (Fcons (Qargs, decoded_cmd), attrs); } - UNGCPRO; return attrs; } @@ -3230,7 +3220,6 @@ system_process_attributes (Lisp_Object pid) gid_t gid; Lisp_Object attrs = Qnil; Lisp_Object decoded_cmd; - struct gcpro gcpro1, gcpro2; ptrdiff_t count; CHECK_NUMBER_OR_FLOAT (pid); @@ -3239,8 +3228,6 @@ system_process_attributes (Lisp_Object pid) if (stat (procfn, &st) < 0) return attrs; - GCPRO2 (attrs, decoded_cmd); - /* euid egid */ uid = st.st_uid; attrs = Fcons (Fcons (Qeuid, make_fixnum_or_float (uid)), attrs); @@ -3333,7 +3320,6 @@ system_process_attributes (Lisp_Object pid) attrs = Fcons (Fcons (Qargs, decoded_cmd), attrs); } unbind_to (count, Qnil); - UNGCPRO; return attrs; } @@ -3369,7 +3355,6 @@ system_process_attributes (Lisp_Object pid) struct kinfo_proc proc; size_t proclen = sizeof proc; - struct gcpro gcpro1, gcpro2; Lisp_Object attrs = Qnil; Lisp_Object decoded_comm; @@ -3380,8 +3365,6 @@ system_process_attributes (Lisp_Object pid) if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0) return attrs; - GCPRO2 (attrs, decoded_comm); - attrs = Fcons (Fcons (Qeuid, make_fixnum_or_float (proc.ki_uid)), attrs); block_input (); @@ -3519,7 +3502,6 @@ system_process_attributes (Lisp_Object pid) attrs = Fcons (Fcons (Qargs, decoded_comm), attrs); } - UNGCPRO; return attrs; } |