PERFORCE change 113278 for review

Todd Miller millert at FreeBSD.org
Sun Jan 21 22:35:38 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=113278

Change 113278 by millert at millert_macbook on 2007/01/21 22:31:53

	buf is guaranteed to be NUL-terminated by vsnprintf() so
	there is no need to terminate it manually.

Affected files ...

.. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/devfs/devfs_tree.c#8 edit

Differences ...

==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/devfs/devfs_tree.c#8 (text+ko) ====

@@ -1184,11 +1184,10 @@
 	va_start(ap, fmt);
 	vsnprintf(buf, sizeof(buf), fmt, ap);
 	va_end(ap);
-
 #ifdef MAC
-	bcopy(buf, buff, sizeof(buff));
-	buff[sizeof(buff)-1] = 0;
+	strcpy(buff, buf);
 #endif
+
 	name = NULL;
 
 	for(i=strlen(buf); i>0; i--)


More information about the trustedbsd-cvs mailing list