about summary refs log tree commit diff
path: root/libio/genops.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-11 05:19:24 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-11 05:19:24 +0000
commitc020d48c6e91b351cefebbc7a82a9c1ec2d9d83b (patch)
tree28f297727c45d6197e23e00356713030cc9cc9fb /libio/genops.c
parent07ba7349279441bd084c8661a4e53c19cba12bf6 (diff)
downloadglibc-c020d48c6e91b351cefebbc7a82a9c1ec2d9d83b.tar.gz
glibc-c020d48c6e91b351cefebbc7a82a9c1ec2d9d83b.tar.xz
glibc-c020d48c6e91b351cefebbc7a82a9c1ec2d9d83b.zip
Update.
	* libio/iovdprintf.c (_IO_vdprintf): Set _IO_USER_LOCK flag for
	temporary stream.  Don't define lock.
	* libio/iovsprintf.c: Likewise.
	* libio/iovsnprintf.c: Likewise.
	* libio/iovswprintf.c: Likewise.
	* libio/iovsscanf.c: Likewise.
	* libio/iovswscanf.c: Likewise.
	* stdio-common/vfprintf.c [USE_IN_LIBIO] (buffered_vfprintf): Likewise.
	* libio/genops.c (_IO_no_init): Don't call _IO_lock_init if _lock
	is NULL.
	(_IO_default_finish): Likewise.
	* libio/wgenops.c (_IO_wdefault_finish): Likewise.
Diffstat (limited to 'libio/genops.c')
-rw-r--r--libio/genops.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libio/genops.c b/libio/genops.c
index f68912ceb4..d786ebca57 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -613,7 +613,8 @@ _IO_no_init (fp, flags, orientation, wd, jmp)
   fp->_vtable_offset = 0;
 #endif
 #ifdef _IO_MTSAFE_IO
-  _IO_lock_init (*fp->_lock);
+  if (fp->_lock != NULL)
+    _IO_lock_init (*fp->_lock);
 #endif
   fp->_mode = orientation;
 #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
@@ -669,7 +670,8 @@ _IO_default_finish (fp, dummy)
     }
 
 #ifdef _IO_MTSAFE_IO
-  _IO_lock_fini (*fp->_lock);
+  if (fp->_lock != NULL)
+    _IO_lock_fini (*fp->_lock);
 #endif
 
   _IO_un_link ((struct _IO_FILE_plus *) fp);
@@ -682,7 +684,7 @@ _IO_default_seekoff (fp, offset, dir, mode)
      int dir;
      int mode;
 {
-    return _IO_pos_BAD;
+  return _IO_pos_BAD;
 }
 
 int