reason for fd<0 for g_open?



I use and implement the key-value file parser on wince. In gkeyfile.c we have some calls of g_open(). The resulting descriptor of g_open sometimes has a negativ sign. This means a succesfull opened file, if less than -1. But the statements "fd < 0" in gkeyfile.c generally cause errors. Is there a reason for  "fd < 0" instead of "fd != -1" according to the exact definition of g_open? For example, in glocalfaile.c, glocalfileoutputstream.c, gmappedfile.c we have the exact query to -1. Would it be possible to change the statements to "fd != -1" in gkeyfile.c? 

Regards
Hanro
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de


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