diff options
Diffstat (limited to 'usr/src/lib/libc/port/stdio/fputs.c')
-rw-r--r-- | usr/src/lib/libc/port/stdio/fputs.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr/src/lib/libc/port/stdio/fputs.c b/usr/src/lib/libc/port/stdio/fputs.c index 58da9af2bc..1ab3c57be5 100644 --- a/usr/src/lib/libc/port/stdio/fputs.c +++ b/usr/src/lib/libc/port/stdio/fputs.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,17 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + /* * Ptr args aren't checked for NULL because the program would be a @@ -118,9 +118,9 @@ fputs(const char *ptr, FILE *iop) /* write out to an unbuffered file */ ssize_t num_wrote; ssize_t count = (ssize_t)ptrlen; + int fd = GET_FD(iop); - while ((num_wrote = write(iop->_file, ptr, - (size_t)count)) != count) { + while ((num_wrote = write(fd, ptr, (size_t)count)) != count) { if (num_wrote <= 0) { iop->_flag |= _IOERR; FUNLOCKFILE(lk); |