Change fix a bug where the length of data written by snprintf was

being mishandled by using accumulation (into an uninitialized
variable) instead of direct assignment.

Reviewed by: scottl
This commit is contained in:
Alfred Perlstein 2005-03-03 17:20:36 +00:00
parent 4b1783363f
commit 9c6519b0a2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=143109

View File

@ -414,7 +414,7 @@ print_arg(int fd, struct syscall_args *sc, unsigned long *args, long retval) {
(POLLIN | POLLPRI | POLLOUT | POLLERR | POLLHUP | POLLNVAL | \
POLLRDNORM |POLLRDBAND | POLLWRBAND | POLLINIGNEOF)
u += snprintf(tmp + used, per_fd,
u = snprintf(tmp + used, per_fd,
"%s%d 0x%hx%s%s%s%s%s%s%s%s%s ",
i > 0 ? " " : "",
pfd[i].fd,