* libc/stdio/puts.c (_puts_r): Fix typo in previous patch. Add local
variable fp for better readability.
This commit is contained in:
parent
0a95d80385
commit
e3132dba59
@ -1,3 +1,8 @@
|
||||
2012-12-18 Corinna Vinschen <vinschen@redhat.com>
|
||||
|
||||
* libc/stdio/puts.c (_puts_r): Fix typo in previous patch. Add local
|
||||
variable fp for better readability.
|
||||
|
||||
2012-12-17 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* libc/stdio/puts.c: Add fp locking and use _stdout_r macro
|
||||
|
@ -82,6 +82,7 @@ _DEFUN(_puts_r, (ptr, s),
|
||||
size_t c = strlen (s);
|
||||
struct __suio uio;
|
||||
struct __siov iov[2];
|
||||
FILE *fp;
|
||||
|
||||
iov[0].iov_base = s;
|
||||
iov[0].iov_len = c;
|
||||
@ -92,11 +93,11 @@ _DEFUN(_puts_r, (ptr, s),
|
||||
uio.uio_iovcnt = 2;
|
||||
|
||||
_REENT_SMALL_CHECK_INIT (ptr);
|
||||
|
||||
_newlib_flockfile_start (_stdout_r (ptr));
|
||||
ORIENT (_stdout_r (ptr), -1);
|
||||
result = (__sfvwrite_r (ptr, _stdout_r (ptr), &uio) ? EOF : '\n');
|
||||
_newlib_flockfile_start (_stdout_r (ptr));
|
||||
fp = _stdout_r (ptr);
|
||||
_newlib_flockfile_start (fp);
|
||||
ORIENT (fp, -1);
|
||||
result = (__sfvwrite_r (ptr, fp, &uio) ? EOF : '\n');
|
||||
_newlib_flockfile_end (fp);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user