diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2020-11-27 11:36:58 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-27 11:36:58 +0000 |
commit | fa618a595bff675fa1d001dc9d57f8fd6c1b052e (patch) | |
tree | 3501f3fe98ac5ec0d909f79c0f7353f54a77b1dc /src/transports/http.c | |
parent | b8cdc9c9c59c61fc699550af5245c57744c1bcbd (diff) | |
parent | c6ebdb296bc44b50fa76e492f57f086bf6c9ec08 (diff) | |
download | libgit2-fa618a595bff675fa1d001dc9d57f8fd6c1b052e.tar.gz |
Merge pull request #5327 from libgit2/ethomson/assert
Introduce GIT_ASSERT macros
Diffstat (limited to 'src/transports/http.c')
-rw-r--r-- | src/transports/http.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/transports/http.c b/src/transports/http.c index fb1740c33..4538dd143 100644 --- a/src/transports/http.c +++ b/src/transports/http.c @@ -416,7 +416,7 @@ static int http_stream_read( goto done; } - assert (stream->state == HTTP_STATE_RECEIVING_RESPONSE); + GIT_ASSERT(stream->state == HTTP_STATE_RECEIVING_RESPONSE); error = git_http_client_read_body(transport->http_client, buffer, buffer_size); @@ -554,7 +554,7 @@ static int http_stream_write( goto done; } - assert(stream->state == HTTP_STATE_SENDING_REQUEST); + GIT_ASSERT(stream->state == HTTP_STATE_SENDING_REQUEST); error = git_http_client_send_body(transport->http_client, buffer, len); @@ -588,7 +588,7 @@ static int http_stream_read_response( (error = handle_response(&complete, stream, &response, false)) < 0) goto done; - assert(complete); + GIT_ASSERT(complete); stream->state = HTTP_STATE_RECEIVING_RESPONSE; } @@ -637,7 +637,8 @@ static int http_action( const http_service *service; int error; - assert(out && t); + GIT_ASSERT_ARG(out); + GIT_ASSERT_ARG(t); *out = NULL; @@ -720,7 +721,7 @@ int git_smart_subtransport_http(git_smart_subtransport **out, git_transport *own GIT_UNUSED(param); - assert(out); + GIT_ASSERT_ARG(out); transport = git__calloc(sizeof(http_subtransport), 1); GIT_ERROR_CHECK_ALLOC(transport); |