Undefined behaviour in posix_openpt?

Jakub Jelinek jakub@redhat.com
Wed Jun 11 13:36:00 GMT 2003


On Wed, Jun 11, 2003 at 04:25:48PM +0300, Yaroslav Popovitch wrote:
> 
> 
> I was checking posix_openpt code(glibc-2.2.5 and glibc-2.2.93) and found 
> strange code. 
> 
> There is a static variable( have_no_dev_ptmx ) 
> which is not initialized by default 
> values. As result, the behaviour of function becomes undefined.

It is static, so it is not undefined, but zero.

	Jakub



More information about the Libc-alpha mailing list