summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2005-09-08 00:12:44 +0000
committerStef Walter <stef@memberwebs.com>2005-09-08 00:12:44 +0000
commit73750a469939ab38feddba5f8eba9ac861869f7f (patch)
tree2f06ba0cab0e5aad2ad86568d3ce658f45b566ca
parent1cf04e798f266315dbe53473886eb8ada27c23db (diff)
Better checks for valid IO.
-rw-r--r--common/smtppass.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/smtppass.h b/common/smtppass.h
index 9dbe935..d10bed1 100644
--- a/common/smtppass.h
+++ b/common/smtppass.h
@@ -77,7 +77,7 @@ typedef struct spio
}
spio_t;
-#define spio_valid(io) ((io)->fd != -1)
+#define spio_valid(io) ((io) && (io)->fd != -1)
/* Setup the io structure (allocated elsewhere) */
void spio_init(spio_t* io, const char* name);