diff options
Diffstat (limited to 'src/sysdep.c')
-rw-r--r-- | src/sysdep.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index fe5a44ea2da..57ea8220cac 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -257,12 +257,12 @@ get_current_dir_name_or_unreachable (void) char *pwd; - /* The maximum size of a directory name, including the terminating null. + /* The maximum size of a directory name, including the terminating NUL. Leave room so that the caller can append a trailing slash. */ ptrdiff_t dirsize_max = min (PTRDIFF_MAX, SIZE_MAX) - 1; /* The maximum size of a buffer for a file name, including the - terminating null. This is bounded by MAXPATHLEN, if available. */ + terminating NUL. This is bounded by MAXPATHLEN, if available. */ ptrdiff_t bufsize_max = dirsize_max; #ifdef MAXPATHLEN bufsize_max = min (bufsize_max, MAXPATHLEN); @@ -3435,7 +3435,7 @@ system_process_attributes (Lisp_Object pid) if (nread) { - /* We don't want trailing null characters. */ + /* We don't want trailing NUL characters. */ for (p = cmdline + nread; cmdline < p && !p[-1]; p--) continue; |