[PATCH 2/2] Initialize all of datahead structure in nscd [BZ #16791]
Mike Frysinger
vapier@gentoo.org
Wed Apr 2 09:42:00 GMT 2014
On Wed 02 Apr 2014 15:10:12 Siddhesh Poyarekar wrote:
> @@ -253,18 +257,21 @@ static inline time_t
> datahead_init_pos (struct datahead *head, nscd_ssize_t allocsize,
> nscd_ssize_t recsize, uint8_t nreloads, uint32_t ttl)
> {
> + time_t ret = datahead_init_common (head, allocsize, recsize, ttl);
> head->notfound = false;
doesn't GNU style say there should be a new line between decls and code ? or
do we not care about that rule in glibc ?
> head->nreloads = nreloads;
> - return datahead_init_common (head, allocsize, recsize, ttl);
> + return ret;
same for return value.
> static inline time_t
> datahead_init_neg (struct datahead *head, nscd_ssize_t allocsize,
> nscd_ssize_t recsize, uint32_t ttl)
> {
> + time_t ret = datahead_init_common (head, allocsize, recsize, ttl);
> + /* We don't need to touch nreloads here since it is set to our desired
> value
> + (0) when we bzero the structure. */
bzero->clear
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140402/222cfd9e/attachment.sig>
More information about the Libc-alpha
mailing list