netutils/webclient: remove else routine
Currently, this codes unnecessary because in this situation,
certainty exiting in this function.
@@ -1302,7 +1302,8 @@ int http_client_send_request(struct http_client_request_t *request,
if (request == NULL) {
printf("Error: Request is null\n");
return -1;
- } else {
+ }
+
request->buffer = (char *)malloc(request->buflen);
if (request->buffer == NULL) {
printf("Error: Fail to malloc buffer\n");
@@ -1312,7 +1313,7 @@ int http_client_send_request(struct http_client_request_t *request,
request->callback = NULL;
request->tls = false;
request->response = response;
- }
+
if (request->url == NULL) {
printf("Error: URL is NULL!!\n");
goto errout;
@@ -1356,7 +1357,8 @@ int http_client_send_request_async(struct http_client_request_t *request,
if (request == NULL) {
printf("Error: Request is null\n");
return -1;
- } else {
+ }
+
request->buffer = (char *)malloc(request->buflen);
if (request->buffer == NULL) {
printf("Error: Fail to malloc buffer\n");
@@ -1366,7 +1368,7 @@ int http_client_send_request_async(struct http_client_request_t *request,
request->callback = cb;
request->tls = false;
request->response = NULL;
- }
+
if (request->url == NULL) {
printf("Error: URL is NULL!!\n");
goto errout;
