summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/regress/lib/libc/dirname/dirname_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/regress/lib/libc/dirname/dirname_test.c b/src/regress/lib/libc/dirname/dirname_test.c
index 7d0b0e221f..0dd95d6c30 100644
--- a/src/regress/lib/libc/dirname/dirname_test.c
+++ b/src/regress/lib/libc/dirname/dirname_test.c
@@ -69,7 +69,7 @@ main(void)
69 69
70 /* Case 4 */ 70 /* Case 4 */
71 strlcpy(path, "/", sizeof(path)); /* reset path */ 71 strlcpy(path, "/", sizeof(path)); /* reset path */
72 for (i = 0; i <= MAXPATHLEN; i += sizeof(dir)) 72 for (i = 0; i <= MAXPATHLEN; i += strlen(dir))
73 strlcat(path, dir, sizeof(path)); 73 strlcat(path, dir, sizeof(path));
74 strlcat(path, fname, sizeof(path)); 74 strlcat(path, fname, sizeof(path));
75 str = dirname(path); 75 str = dirname(path);