This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Remove extra va_start/va_end calls (bug 17244)
- From: Andreas Schwab <schwab at suse dot de>
- To: libc-alpha at sourceware dot org
- Date: Wed, 16 Sep 2015 14:53:20 +0200
- Subject: [PATCH] Remove extra va_start/va_end calls (bug 17244)
- Authentication-results: sourceware.org; auth=none
The extra calls are effectively no-ops in gcc, so it doesn't affect the
generated code at all. Installed as obvious.
Andreas.
[BZ #17244]
* sysdeps/unix/sysv/linux/semctl.c (__old_semctl, __new_semctl):
Remove extra va_start/va_end calls.
diff --git a/sysdeps/unix/sysv/linux/semctl.c b/sysdeps/unix/sysv/linux/semctl.c
index e794a58..81a33a9 100644
--- a/sysdeps/unix/sysv/linux/semctl.c
+++ b/sysdeps/unix/sysv/linux/semctl.c
@@ -65,8 +65,6 @@ __old_semctl (int semid, int semnum, int cmd, ...)
union semun arg;
va_list ap;
- va_start (ap, cmd);
-
/* Get the argument only if required. */
arg.buf = NULL;
switch (cmd)
@@ -85,8 +83,6 @@ __old_semctl (int semid, int semnum, int cmd, ...)
break;
}
- va_end (ap);
-
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
&arg);
}
@@ -99,8 +95,6 @@ __new_semctl (int semid, int semnum, int cmd, ...)
union semun arg;
va_list ap;
- va_start (ap, cmd);
-
/* Get the argument only if required. */
arg.buf = NULL;
switch (cmd)
@@ -119,8 +113,6 @@ __new_semctl (int semid, int semnum, int cmd, ...)
break;
}
- va_end (ap);
-
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd | __IPC_64,
&arg);
}
--
2.5.2
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."