diff options
author | pjd <pjd@FreeBSD.org> | 2013-02-25 20:51:29 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2013-02-25 20:51:29 +0000 |
commit | 9dc77e1662fd8adcb9f240934bb34cb5a041e783 (patch) | |
tree | c520c33314e9f2fcddae90ec03ebfb3d2476e4d3 /sys/kern/kern_descrip.c | |
parent | d632a8a17e630c79d1e1879d5cf51703ab1b3545 (diff) | |
download | FreeBSD-src-9dc77e1662fd8adcb9f240934bb34cb5a041e783.zip FreeBSD-src-9dc77e1662fd8adcb9f240934bb34cb5a041e783.tar.gz |
Style.
Suggested by: kib
Diffstat (limited to 'sys/kern/kern_descrip.c')
-rw-r--r-- | sys/kern/kern_descrip.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index fafd95c..acdea40 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1425,8 +1425,7 @@ fdgrowtable(struct filedesc *fdp, int nfd) FILEDESC_XLOCK_ASSERT(fdp); - KASSERT(fdp->fd_nfiles > 0, - ("zero-length file table")); + KASSERT(fdp->fd_nfiles > 0, ("zero-length file table")); /* save old values */ onfiles = fdp->fd_nfiles; @@ -1447,13 +1446,11 @@ fdgrowtable(struct filedesc *fdp, int nfd) * it on the freelist. We place the struct freetable in the * middle so we don't have to worry about padding. */ - ntable = malloc(nnfiles * sizeof(*ntable) + - sizeof(struct freetable) + - nnfiles * sizeof(*nfileflags), - M_FILEDESC, M_ZERO | M_WAITOK); + ntable = malloc(nnfiles * sizeof(*ntable) + sizeof(struct freetable) + + nnfiles * sizeof(*nfileflags), M_FILEDESC, M_ZERO | M_WAITOK); nfileflags = (char *)&ntable[nnfiles] + sizeof(struct freetable); - nmap = malloc(NDSLOTS(nnfiles) * NDSLOTSIZE, - M_FILEDESC, M_ZERO | M_WAITOK); + nmap = malloc(NDSLOTS(nnfiles) * NDSLOTSIZE, M_FILEDESC, + M_ZERO | M_WAITOK); /* copy the old data over and point at the new tables */ memcpy(ntable, otable, onfiles * sizeof(*otable)); |