simplify some logic in scanf and remove redundant invalid-format check
[musl] / src / ipc / semop.c
index 48d8a65..8046e43 100644 (file)
@@ -4,9 +4,9 @@
 
 int semop(int id, struct sembuf *buf, size_t n)
 {
-#ifdef __NR_semop
-       return syscall3(__NR_semop, id, (long)buf, n);
+#ifdef SYS_semop
+       return syscall(SYS_semop, id, buf, n);
 #else
-       return syscall5(__NR_ipc, IPCOP_semop, id, n, 0, (long)buf);
+       return syscall(SYS_ipc, IPCOP_semop, id, n, 0, buf);
 #endif
 }