Created attachment 1882 [details] Patch to use proper enum values for uninitialized states Hello! Please find the attached patch which aims to use proper enum values instead of -1 for uninitialized states. Since the type of enum is implementation defined[0] and can be unsigned int, storing or comparing with -1 in 0-based enum is troublesome. Please let me know if anything needs to be fixed/amended. Thanks! [0] http://port70.net/~nsz/c/c11/n1570.html#6.7.2.2p4 Regards, Avinash Sonawane (rootKea) PICT, Pune https://rootkea.wordpress.com