eclass != ERRDOS && num != ERRmoredata
authorMatthew Chapman <matty@samba.org>
Fri, 15 Jan 1999 05:09:36 +0000 (05:09 +0000)
committerMatthew Chapman <matty@samba.org>
Fri, 15 Jan 1999 05:09:36 +0000 (05:09 +0000)
is not the same as
!(eclass == ERRDOS && num == ERRmoredata)

This was causing smbclient to segfault on receiving certain errors.
(This used to be commit 15bd172530af360cf16ad626330dfe2ea92100df)

source3/libsmb/clientgen.c

index 5bae8ffa81cfeb866618d3f3c49c757e9106c280..688764fa7320f6c938c91de89a75a2c0bb0d8dc2 100644 (file)
@@ -345,7 +345,7 @@ static BOOL cli_receive_trans(struct cli_state *cli,int trans,
        }
 
        /* DOS error "more data" is an acceptable error code */
        }
 
        /* DOS error "more data" is an acceptable error code */
-       if (cli_error(cli, &eclass, &num) && eclass != ERRDOS && num != ERRmoredata)
+       if (cli_error(cli, &eclass, &num) && !(eclass == ERRDOS && num == ERRmoredata))
        {
                return(False);
        }
        {
                return(False);
        }