diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-08-27 17:52:23 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-08-27 17:52:23 +0000 |
commit | ee5f7237decfe446f4fdb08422beb2e6cb43af7f (patch) | |
tree | 80b217a2938d7e0d46a5d20517c9adb0807ecd1a /source3/libsmb/clireadwrite.c | |
parent | e8e98c9ea0690e3acf1126b50882e59e1056c7b3 (diff) | |
download | samba-ee5f7237decfe446f4fdb08422beb2e6cb43af7f.tar.gz samba-ee5f7237decfe446f4fdb08422beb2e6cb43af7f.tar.bz2 samba-ee5f7237decfe446f4fdb08422beb2e6cb43af7f.zip |
started converting NTSTATUS to be a structure on systems with gcc in order to make it type incompatible with BOOL so we catch errors sooner. This has already found a number of bugs
(This used to be commit 1b778bc7d22efff3f90dc450eb12baa1241cf68f)
Diffstat (limited to 'source3/libsmb/clireadwrite.c')
-rw-r--r-- | source3/libsmb/clireadwrite.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c index 6566acf4ef..abbb8cd110 100644 --- a/source3/libsmb/clireadwrite.c +++ b/source3/libsmb/clireadwrite.c @@ -110,16 +110,17 @@ ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_ errors. */ if (cli_is_error(cli)) { - uint32 status = 0; + NTSTATUS status = NT_STATUS_OK; uint8 eclass = 0; + uint32 ecode = 0; if (cli_is_nt_error(cli)) status = cli_nt_error(cli); else - cli_dos_error(cli, &eclass, &status); + cli_dos_error(cli, &eclass, &ecode); - if ((eclass == ERRDOS && status == ERRmoredata) || - status == STATUS_MORE_ENTRIES) + if ((eclass == ERRDOS && ecode == ERRmoredata) || + NT_STATUS_V(status) == NT_STATUS_V(STATUS_MORE_ENTRIES)) return -1; } |