Re: pthread_attr_init example

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Jonny Grant <jg@xxxxxxxx>, 2018-11-25, 12:56:
http://man7.org/linux/man-pages/man3/pthread_attr_init.3.html

In the example, it seems strange to have this
attrp = &attr;

That happens only if argc > 1. Otherwise attr is uninitialized and attrp is NULL.

May as well just use &attr the whole way through

No, that wouldn't work for the argc == 1 case.

--
Jakub Wilk



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux