Am 01.12.2016 um 01:01 schrieb Danny Milosavljevic: > So I'd say to compare with (uid_t)-1 would be fine > > if (settings.clientUid != (uid_t) -1) { > ... > }
Thanks for this tip, Danny. This made it work and I just posted the updated patch. > > And casting uid_t to unisgned int might return the same uid as "nobody". > [...] > > (-1) in two-complement 16 bit integral encoding (which is technically not > guaranteed to be used in C) would be 65535. Ahh, well, yes. I'm not quite good on bit operations, esp. on representations of negative numbers. Thanks to doing this right. -- Regards Hartmut Goebel | Hartmut Goebel | h.goe...@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |