Deutsch English Français Italiano |
<20240311202758.193@kylheku.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Kaz Kylheku <433-929-6894@kylheku.com> Newsgroups: comp.lang.c Subject: Re: Word For Today: =?UTF-8?Q?=E2=80=9CUglification=E2=80=9D?= Date: Tue, 12 Mar 2024 03:30:55 -0000 (UTC) Organization: A noiseless patient Spider Lines: 22 Message-ID: <20240311202758.193@kylheku.com> References: <uso6or$3t3jn$3@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 12 Mar 2024 03:30:55 -0000 (UTC) Injection-Info: dont-email.me; posting-host="103d6665e02695c45444ee5fbac9bd46"; logging-data="101344"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/gud0bg//B6KlWWlCXqUiBuPe4AOzR7N0=" User-Agent: slrn/pre1.0.4-9 (Linux) Cancel-Lock: sha1:kBQkGucaMTKp6f2cckv1hA+qxx8= Bytes: 1783 On 2024-03-12, Lawrence D'Oliveiro <ldo@nz.invalid> wrote: > From /usr/include/«arch»/bits/select.h on my Debian system: > > #define __FD_ZERO(s) \ > do { \ > unsigned int __i; \ > fd_set *__arr = (s); \ This assignment has value; it checks that, loosely speaking, s is an "assignment compatible" pointer with a fd_set *, so that there is a diagnostic if the macro is applied to an object of the wrong type. > for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ > __FDS_BITS (__arr)[__i] = 0; \ Here, I would have done memset(__arr, 0, sizeof *__arr). -- TXR Programming Language: http://nongnu.org/txr Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal Mastodon: @Kazinator@mstdn.ca