Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jul 2007 14:07:41 GMT
From:      Roman Divacky <rdivacky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 123961 for review
Message-ID:  <200707231407.l6NE7frG070245@repoman.freebsd.org>

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

Change 123961 by rdivacky@rdivacky_witten on 2007/07/23 14:06:59

	Slight optimization of fexecve() process title filling in.
	
	Suggested by: kib

Affected files ...

.. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/kern_exec.c#15 edit

Differences ...

==== //depot/projects/soc2007/rdivacky/linux_at/sys/kern/kern_exec.c#15 (text+ko) ====

@@ -569,8 +569,9 @@
 			if (freepath)
 				free(freepath, M_TEMP);
 		} else {
-			len = strlen("fexecved process");
-			bcopy("fexecved process", p->p_comm, len);
+			static const char proc_title[] = "fexecved process";
+			len = sizeof(proc_title);
+			bcopy(proc_title, p->p_comm, len);
 		}
 		error = 0;
 	}



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