Module Name:    src
Committed By:   pooka
Date:           Wed Oct 13 11:19:28 UTC 2010

Modified Files:
        src/tests/lib/libc/gen: t_glob_star.c

Log Message:
Use actual buffer size instead of sizeof(char *).  Makes the test
work on non-64bit platforms.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/gen/t_glob_star.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/gen/t_glob_star.c
diff -u src/tests/lib/libc/gen/t_glob_star.c:1.4 src/tests/lib/libc/gen/t_glob_star.c:1.5
--- src/tests/lib/libc/gen/t_glob_star.c:1.4	Wed Oct 13 10:31:00 2010
+++ src/tests/lib/libc/gen/t_glob_star.c	Wed Oct 13 11:19:28 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_glob_star.c,v 1.4 2010/10/13 10:31:00 pooka Exp $	*/
+/*	$NetBSD: t_glob_star.c,v 1.5 2010/10/13 11:19:28 pooka Exp $	*/
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_glob_star.c,v 1.4 2010/10/13 10:31:00 pooka Exp $");
+__RCSID("$NetBSD: t_glob_star.c,v 1.5 2010/10/13 11:19:28 pooka Exp $");
 
 #include <atf-c.h>
 
@@ -99,7 +99,7 @@
 static void
 trim(char *buf, size_t len, const char *name)
 {
-	char *path = buf, *epath = buf + sizeof(buf) - 1;
+	char *path = buf, *epath = buf + len;
 	while (path < epath && (*path++ = *name++) != '\0')
 		continue;
 	path--;

Reply via email to