changeset 24462:40b05303ac32

osutil: mark end of string with null char, not 0 Noticed this while working on other stuff in the area.
author Siddharth Agarwal <sid0@fb.com>
date Wed, 25 Mar 2015 16:21:58 -0700
parents 05ccfe6763f1
children 06d199e66bbc
files mercurial/osutil.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/osutil.c	Wed Mar 25 15:55:31 2015 -0700
+++ b/mercurial/osutil.c	Wed Mar 25 16:21:58 2015 -0700
@@ -343,7 +343,7 @@
 #else
 			strncpy(fullpath + pathlen + 1, ent->d_name,
 				PATH_MAX - pathlen);
-			fullpath[PATH_MAX] = 0;
+			fullpath[PATH_MAX] = '\0';
 			err = lstat(fullpath, &st);
 #endif
 			if (err == -1) {