diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fileio.c | 10 | ||||
-rw-r--r-- | src/filelock.c | 2 | ||||
-rw-r--r-- | src/sysdep.c | 10 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/fileio.c b/src/fileio.c index 5dd14daacb4..0da9894a73a 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2599,13 +2599,13 @@ This is what happens in interactive use with M-x. */) DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3, "FMake symbolic link to file: \nGMake symbolic link to file %s: \np", - doc: /* Make a symbolic link to TARGET, named NEWNAME. -If NEWNAME is a directory name, make a like-named symbolic link under -NEWNAME. + doc: /* Make a symbolic link to TARGET, named LINKNAME. +If LINKNAME is a directory name, make a like-named symbolic link under +LINKNAME. -Signal a `file-already-exists' error if a file NEWNAME already exists +Signal a `file-already-exists' error if a file LINKNAME already exists unless optional third argument OK-IF-ALREADY-EXISTS is non-nil. -An integer third arg means request confirmation if NEWNAME already +An integer third arg means request confirmation if LINKNAME already exists, and expand leading "~" or strip leading "/:" in TARGET. This happens for interactive use with M-x. */) (Lisp_Object target, Lisp_Object linkname, Lisp_Object ok_if_already_exists) diff --git a/src/filelock.c b/src/filelock.c index baf87b7f635..b1f7d9dce61 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -152,7 +152,7 @@ get_boot_time (void) mib[1] = KERN_BOOTTIME; size = sizeof (boottime_val); - if (sysctl (mib, 2, &boottime_val, &size, NULL, 0) >= 0) + if (sysctl (mib, 2, &boottime_val, &size, NULL, 0) >= 0 && size != 0) { boot_time = boottime_val.tv_sec; return boot_time; diff --git a/src/sysdep.c b/src/sysdep.c index f7fc99f147f..4f89e8aba10 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -3018,11 +3018,11 @@ list_system_processes (void) Lisp_Object proclist = Qnil; - if (sysctl (mib, 3, NULL, &len, NULL, 0) != 0) + if (sysctl (mib, 3, NULL, &len, NULL, 0) != 0 || len == 0) return proclist; procs = xmalloc (len); - if (sysctl (mib, 3, procs, &len, NULL, 0) != 0) + if (sysctl (mib, 3, procs, &len, NULL, 0) != 0 || len == 0) { xfree (procs); return proclist; @@ -3616,7 +3616,7 @@ system_process_attributes (Lisp_Object pid) CONS_TO_INTEGER (pid, int, proc_id); mib[3] = proc_id; - if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0) + if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0 || proclen == 0) return attrs; attrs = Fcons (Fcons (Qeuid, INT_TO_INTEGER (proc.ki_uid)), attrs); @@ -3739,7 +3739,7 @@ system_process_attributes (Lisp_Object pid) mib[2] = KERN_PROC_ARGS; len = MAXPATHLEN; - if (sysctl (mib, 4, args, &len, NULL, 0) == 0) + if (sysctl (mib, 4, args, &len, NULL, 0) == 0 && len != 0) { int i; for (i = 0; i < len; i++) @@ -3785,7 +3785,7 @@ system_process_attributes (Lisp_Object pid) CONS_TO_INTEGER (pid, int, proc_id); mib[3] = proc_id; - if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0) + if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0 || proclen == 0) return attrs; uid = proc.kp_eproc.e_ucred.cr_uid; |