diff --git a/http/http.c b/http/http.c
index 2775347..06fddd6 100644
--- a/http/http.c
+++ b/http/http.c
@@ -32,17 +32,17 @@ s_http_request * http_request_buf_parse (s_http_request *req, s_buf *buf)
err_puts("http_request_buf_parse: no method");
goto restore;
}
- if ((r = buf_read_until_1_into_str(buf, " ", &tmp.url)) <= 0) {
+ if (! buf_read_until_1_into_str(buf, " ", &tmp.url)) {
err_puts("http_request_buf_parse: invalid URL");
goto restore;
}
- if ((r = buf_read_until_1_into_str(buf, "\r\n", &tmp.protocol)) <= 0) {
+ if (! buf_read_until_1_into_str(buf, "\r\n", &tmp.protocol)) {
err_puts("http_request_buf_parse: invalid protocol");
goto restore;
}
tail = &tmp.headers;
while (1) {
- if ((r = buf_read_until_1_into_str(buf, "\r\n", &line)) <= 0) {
+ if (! buf_read_until_1_into_str(buf, "\r\n", &line)) {
err_puts("http_request_buf_parse: invalid header");
goto restore;
}
@@ -60,4 +60,4 @@ s_http_request * http_request_buf_parse (s_http_request *req, s_buf *buf)
buf_save_restore_rpos(buf, &save);
buf_save_clean(buf, &save);
return NULL;
-}
\ No newline at end of file
+}