sigqueue/pthread_sigqueue: cleanup.

Remove the explicit memset() from one of the two callers, and use explicit initialization for both. This makes it clearer that optimizing the zeroing of the rest of the struct is the compiler's problem, not ours.

Add the "missing" assignment to si_signo in pthread_sigqueue() that isn't actually necessary because the kernel will overwrite that field anyway when it copies from userspace, but which looked like a bug given the difference between the sigqueue() and pthread_sigqueue() implementations.

Also reuse the result of getpid() in pthread_sigqueue() rather than calling it twice.

Change-Id: I39578d80ddc5edcb7d235b078392e20f35713dba
diff --git a/libc/bionic/pthread_sigqueue.cpp b/libc/bionic/pthread_sigqueue.cpp
index 93c349e..7c10b25 100644
--- a/libc/bionic/pthread_sigqueue.cpp
+++ b/libc/bionic/pthread_sigqueue.cpp
@@ -40,14 +40,16 @@
 int pthread_sigqueue(pthread_t t, int sig, const union sigval value) {
   ErrnoRestorer errno_restorer;
 
+  pid_t pid = getpid();
+
   pid_t tid = __pthread_internal_gettid(t, "pthread_sigqueue");
   if (tid == -1) return ESRCH;
 
-  siginfo_t siginfo;
-  siginfo.si_code = SI_QUEUE;
-  siginfo.si_pid = getpid();
+  siginfo_t siginfo = { .si_code = SI_QUEUE };
+  siginfo.si_signo = sig;
+  siginfo.si_pid = pid;
   siginfo.si_uid = getuid();
   siginfo.si_value = value;
 
-  return syscall(__NR_rt_tgsigqueueinfo, getpid(), tid, sig, &siginfo) ? errno : 0;
+  return syscall(__NR_rt_tgsigqueueinfo, pid, tid, sig, &siginfo) ? errno : 0;
 }