this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert the unnecessary use of va_arg

+2 -9
+1 -8
src/kernel/emulation/linux/sysv_sem/semctl.c
··· 4 4 #include "../duct_errno.h" 5 5 #include <linux-syscalls/linux.h> 6 6 #include <stdint.h> 7 - #include <stdarg.h> 8 7 9 8 #if defined(__i386__) || defined(__arm__) 10 9 #define LINUX_IPC_64 0x100 ··· 25 24 26 25 extern void *memcpy(void *dest, const void *src, __SIZE_TYPE__ n); 27 26 28 - long sys_semctl(int semid, int semnum, int cmd, ...) 27 + long sys_semctl(int semid, int semnum, int cmd, union semun arg) 29 28 { 30 - union semun arg; 31 - va_list ap; 32 - va_start(ap, cmd); 33 - arg = va_arg(ap, union semun); 34 - va_end(ap); 35 - 36 29 if (cmd < 0 || cmd >= sizeof(cmd_map) / sizeof(cmd_map[0])) 37 30 return -EINVAL; 38 31
+1 -1
src/kernel/emulation/linux/sysv_sem/semctl.h
··· 49 49 50 50 typedef union semun semun_t; 51 51 52 - long sys_semctl(int semid, int semnum, int cmd, ...); 52 + long sys_semctl(int semid, int semnum, int cmd, union semun arg); 53 53 54 54 #endif