diff options
author | Alain Magloire <alainm@gnu.org> | 2001-10-25 01:44:01 +0000 |
---|---|---|
committer | Alain Magloire <alainm@gnu.org> | 2001-10-25 01:44:01 +0000 |
commit | 7dc6bca632a27e932c72f419fed77a43cb677920 (patch) | |
tree | e1709b7c05c989819dcb522eaea67ec04aae2b14 /mailbox2 | |
parent | 89c7c751144959bca61dd43250348b68599613cc (diff) | |
download | mailutils-7dc6bca632a27e932c72f419fed77a43cb677920.tar.gz mailutils-7dc6bca632a27e932c72f419fed77a43cb677920.tar.bz2 |
fix bug.
Diffstat (limited to 'mailbox2')
-rw-r--r-- | mailbox2/mbox/mbox_cb.c | 12 | ||||
-rw-r--r-- | mailbox2/mbox/mbox_scan.c | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/mailbox2/mbox/mbox_cb.c b/mailbox2/mbox/mbox_cb.c index aaf128eb0..69896ba10 100644 --- a/mailbox2/mbox/mbox_cb.c +++ b/mailbox2/mbox/mbox_cb.c @@ -25,7 +25,7 @@ int mbox_set_progress_cb (mbox_t mbox, int (*cb) __P ((int, void *)), void *arg) { - if (mbox) + if (mbox == NULL) return MU_ERROR_INVALID_PARAMETER; mbox->progress.cb = cb; mbox->progress.arg = arg; @@ -35,7 +35,7 @@ mbox_set_progress_cb (mbox_t mbox, int (*cb) __P ((int, void *)), void *arg) int mbox_set_newmsg_cb (mbox_t mbox, int (*cb) __P ((int, void *)), void *arg) { - if (mbox) + if (mbox == NULL) return MU_ERROR_INVALID_PARAMETER; mbox->newmsg.cb = cb; mbox->newmsg.arg = arg; @@ -45,7 +45,7 @@ mbox_set_newmsg_cb (mbox_t mbox, int (*cb) __P ((int, void *)), void *arg) int mbox_set_error_cb (mbox_t mbox, int (*cb) __P ((int, void *)), void *arg) { - if (mbox) + if (mbox == NULL) return MU_ERROR_INVALID_PARAMETER; mbox->error.cb = cb; mbox->error.arg = arg; @@ -55,7 +55,7 @@ mbox_set_error_cb (mbox_t mbox, int (*cb) __P ((int, void *)), void *arg) int mbox_newmsg_cb (mbox_t mbox, int info) { - if (mbox) + if (mbox == NULL) return MU_ERROR_INVALID_PARAMETER; if (mbox->newmsg.cb) return mbox->newmsg.cb (info, mbox->newmsg.arg); @@ -65,7 +65,7 @@ mbox_newmsg_cb (mbox_t mbox, int info) int mbox_progress_cb (mbox_t mbox, int info) { - if (mbox) + if (mbox == NULL) return MU_ERROR_INVALID_PARAMETER; if (mbox->progress.cb) return mbox->progress.cb (info, mbox->progress.arg); @@ -75,7 +75,7 @@ mbox_progress_cb (mbox_t mbox, int info) int mbox_error_cb (mbox_t mbox, int info) { - if (mbox) + if (mbox == NULL) return MU_ERROR_INVALID_PARAMETER; if (mbox->error.cb) return mbox->error.cb (info, mbox->error.arg); diff --git a/mailbox2/mbox/mbox_scan.c b/mailbox2/mbox/mbox_scan.c index 18027c817..823357190 100644 --- a/mailbox2/mbox/mbox_scan.c +++ b/mailbox2/mbox/mbox_scan.c @@ -176,6 +176,8 @@ mbox_scan0 (mbox_t mbox, unsigned int msgno, unsigned int *pcount, else status = MU_ERROR_IO; } + else + status = MU_ERROR_IO; /* Move along, move along nothing to see. */ if (!mbox_has_newmail (mbox) && mbox->size == file_size) |