Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jan 2007 22:32:27 GMT
From:      Todd Miller <millert@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 113278 for review
Message-ID:  <200701212232.l0LMWRZL061838@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=113278

Change 113278 by millert@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--)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701212232.l0LMWRZL061838>