Query : siginitsetinv/siginitset has a memset of size 0

From: pavi1729
Date: Thu Jul 21 2016 - 11:12:25 EST


Hi,
signal.h code and a memset of size 0, is that fine or am I missing something ?


http://lxr.free-electrons.com/source/include/linux/signal.h

200 static inline void siginitsetinv(sigset_t *set, unsigned long mask)
201 {
202 set->sig[0] = ~mask;
203 switch (_NSIG_WORDS) {
204 default:
205 memset(&set->sig[1], -1,
sizeof(long)*(_NSIG_WORDS-1)); <-- size 0
206 break;
207 case 2: set->sig[1] = -1;
208 case 1: ;
209 }
210 }


http://lxr.free-electrons.com/source/arch/ia64/include/asm/signal.h#L16
14 #define _NSIG 64
15 #define _NSIG_BPW 64
16 #define _NSIG_WORDS (_NSIG / _NSIG_BPW)
17


Thanks,
Pavi