[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMf7+Li9ZgourzX67NGAKWEY+cdkjSyf4nVUg_q0tya-zF=ewQ@mail.gmail.com>
Date: Thu, 21 Jul 2016 20:42:13 +0530
From: pavi1729 <pavitra1729@...il.com>
To: linux-kernel@...r.kernel.org
Subject: Query : siginitsetinv/siginitset has a memset of size 0
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
Powered by blists - more mailing lists