Re: pthread_attr_init example

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

 





On 25/11/2018 14:51, Jakub Wilk wrote:
* 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.

You're right, my mistake.

Jonny



[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