diff options
author | Yang Tse <yangsita@gmail.com> | 2013-02-19 16:53:13 +0100 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2013-02-19 16:53:13 +0100 |
commit | 52605e006cddccf8b7194389f7e14c04bee089c3 (patch) | |
tree | 6f1819fe3d49b4231c8b8b9a3f9f78a503e70962 | |
parent | 6a87ac8c88a1c6cb363a557158759ea4be3a6cba (diff) |
smtp.c: fix enumerated type mixed with another type
-rw-r--r-- | lib/smtp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/smtp.c b/lib/smtp.c index d63b4e1ea..cad18cdfc 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -219,14 +219,15 @@ static bool smtp_endofresp(struct connectdata *conn, char *line, size_t len, int *resp) { struct smtp_conn *smtpc = &conn->proto.smtpc; - int result = FALSE; + bool result = FALSE; size_t wordlen; if(len < 4 || !ISDIGIT(line[0]) || !ISDIGIT(line[1]) || !ISDIGIT(line[2])) return FALSE; /* Nothing for us */ /* Do we have a command response? */ - if((result = (line[3] == ' ')) != 0) + result = (line[3] == ' ') ? TRUE : FALSE; + if(result) *resp = curlx_sltosi(strtol(line, NULL, 10)); /* Are we processing EHLO command data? */ |