nmbd.c open_sockets() have wonder initialization.

Michael Ju. Tokarev mjt at tls.msk.ru
Wed Nov 8 23:48:10 GMT 2000


Kenichi Okuyama wrote:
> 
> Dear all,
> 
[]
> +        if ( ClientNMB == -1 ) {
[]
> +    if ( ClientDGRAM == -1 ) {
[]
I was always curious in such places -- why to check with -1?
Why not to use

  if ( fd < 0 ) {

(and the same for all other routines etc etc).
Less typing (two extra chars :)) and _a bit_ efficient
code...
samba-technical at samba.org




More information about the samba-technical mailing list