This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Get rid of superfluous assignments


Hi!

nptl/
2012-01-23  Thomas Schwinge  <thomas@codesourcery.com>

	* sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
	superfluous assignment.
	* sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
	(sem_timedwait): Likewise.

diff --git a/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c b/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
index cb3b78f..cbb56d0 100644
--- a/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
+++ b/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
@@ -1,5 +1,5 @@
 /* sem_timedwait -- wait on a semaphore.  Generic futex-using version.
-   Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2007, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
 
@@ -84,7 +84,6 @@ sem_timedwait (sem_t *sem, const struct timespec *abstime)
 	}
 
       /* Already timed out?  */
-      err = -ETIMEDOUT;
       if (sec < 0)
 	{
 	  __set_errno (ETIMEDOUT);
diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sem_timedwait.c b/nptl/sysdeps/unix/sysv/linux/sparc/sem_timedwait.c
index fdd09af..eb2beda 100644
--- a/nptl/sysdeps/unix/sysv/linux/sparc/sem_timedwait.c
+++ b/nptl/sysdeps/unix/sysv/linux/sparc/sem_timedwait.c
@@ -1,5 +1,5 @@
 /* sem_timedwait -- wait on a semaphore.  Generic futex-using version.
-   Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2007, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
 
@@ -84,7 +84,6 @@ sem_timedwait (sem_t *sem, const struct timespec *abstime)
 	}
 
       /* Already timed out?  */
-      err = -ETIMEDOUT;
       if (sec < 0)
 	{
 	  __set_errno (ETIMEDOUT);
diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c b/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
index 90edbc5..4410554 100644
--- a/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
+++ b/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
@@ -1,5 +1,5 @@
 /* sem_timedwait -- wait on a semaphore.  SPARC version.
-   Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006, 2007, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
 
@@ -103,7 +103,6 @@ sem_timedwait (sem_t *sem, const struct timespec *abstime)
 	}
 
       /* Already timed out?  */
-      err = -ETIMEDOUT;
       if (sec < 0)
 	{
 	  __set_errno (ETIMEDOUT);


GrÃÃe,
 Thomas

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]