linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* strtod(3) manual page not clear on error handling when endptr is null
@ 2016-04-28 16:31 Ed Avis
       [not found] ` <7E039918541B4C4183BFDB8F015C7430DEB54FB3-wKnzbhvBYoCBAzx/YO/BcIT4S9po1h25@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Ed Avis @ 2016-04-28 16:31 UTC (permalink / raw)
  To: 'mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org'
  Cc: 'linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org'

strtod(3) says:

>If no conversion is performed, zero is returned and the value of nptr is stored in the location referenced by endptr.

This surely can't be the case if endptr is null.  I believe that the behaviour is more like

>If no conversion is performed, zero is returned, and (unless endptr is null) the value of nptr is stored in the location referenced by endptr.

-- 
Ed Avis <eda-0aTcAJqSNDHby3iVrkZq2A@public.gmane.org>


This email is intended only for the person to whom it is addressed and may contain confidential information. Any retransmission, copying, disclosure or other use of, this information by persons other than the intended recipient is prohibited. If you received this email in error, please contact the sender and delete the material. This email is for information only and is not intended as an offer or solicitation for the purchase or sale of any financial instrument. Wadhwani Asset Management LLP is a Limited Liability Partnership registered in England (OC303168) with registered office at 40 Berkeley Square, 3rd Floor, London, W1J 5AL. It is authorised and regulated by the Financial Conduct Authority.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: strtod(3) manual page not clear on error handling when endptr is null
       [not found] ` <7E039918541B4C4183BFDB8F015C7430DEB54FB3-wKnzbhvBYoCBAzx/YO/BcIT4S9po1h25@public.gmane.org>
@ 2016-05-09 20:54   ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2016-05-09 20:54 UTC (permalink / raw)
  To: Ed Avis
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
	'linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org'

Hello Ed,

On 04/28/2016 06:31 PM, Ed Avis wrote:
> strtod(3) says:
> 
> If no conversion is performed, zero is returned and the value of nptr
> is stored in the location referenced by endptr.
> 
> This surely can't be the case if endptr is null.  I believe that the
> behaviour is more like
> 
> 
> If no conversion is performed, zero is returned, and (unless endptr
> is null) the value of nptr is stored in the location referenced by
> endptr.

Agreed. Page corrected.

Thanks,

Michael


> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-09 20:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-28 16:31 strtod(3) manual page not clear on error handling when endptr is null Ed Avis
     [not found] ` <7E039918541B4C4183BFDB8F015C7430DEB54FB3-wKnzbhvBYoCBAzx/YO/BcIT4S9po1h25@public.gmane.org>
2016-05-09 20:54   ` Michael Kerrisk (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).