osutil: mark end of string with null char, not 0
authorSiddharth Agarwal <sid0@fb.com>
Wed, 25 Mar 2015 16:21:58 -0700
changeset 24462 40b05303ac32
parent 24461 05ccfe6763f1
child 24463 06d199e66bbc
osutil: mark end of string with null char, not 0 Noticed this while working on other stuff in the area.
mercurial/osutil.c
--- 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) {