summaryrefslogtreecommitdiff
path: root/nuttx/libc/misc/lib_filesem.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-11 19:08:51 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-11 19:08:51 +0000
commit049b66a75a6f7795b5e80ce70122479f2ef31586 (patch)
tree2af089980e448cc2cf6ae01d884acb23f26f6d88 /nuttx/libc/misc/lib_filesem.c
parent7272d1e7473fc1ce1d0a29c7287260402ca2420e (diff)
downloadpx4-nuttx-049b66a75a6f7795b5e80ce70122479f2ef31586.tar.gz
px4-nuttx-049b66a75a6f7795b5e80ce70122479f2ef31586.tar.bz2
px4-nuttx-049b66a75a6f7795b5e80ce70122479f2ef31586.zip
Fix an error handling bug in the fread logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5511 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/libc/misc/lib_filesem.c')
-rw-r--r--nuttx/libc/misc/lib_filesem.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/nuttx/libc/misc/lib_filesem.c b/nuttx/libc/misc/lib_filesem.c
index 5cc4624ec..f38ff5f23 100644
--- a/nuttx/libc/misc/lib_filesem.c
+++ b/nuttx/libc/misc/lib_filesem.c
@@ -67,8 +67,8 @@
void lib_sem_initialize(FAR struct file_struct *stream)
{
- /* Initialize the LIB semaphore to one (to support one-at-
- * a-time access to private data sets.
+ /* Initialize the LIB semaphore to one (to support one-at-a-time access
+ * to private data sets.
*/
(void)sem_init(&stream->fs_sem, 0, 1);
@@ -98,13 +98,13 @@ void lib_take_semaphore(FAR struct file_struct *stream)
/* Take the semaphore (perhaps waiting) */
while (sem_wait(&stream->fs_sem) != 0)
- {
- /* The only case that an error should occr here is if
- * the wait was awakened by a signal.
- */
+ {
+ /* The only case that an error should occr here is if the wait
+ * was awakened by a signal.
+ */
- ASSERT(get_errno() == EINTR);
- }
+ ASSERT(get_errno() == EINTR);
+ }
/* We have it. Claim the stak and return */