Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
skelly committed Sep 11, 2024
1 parent b9af94d commit e12a322
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/client/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void print_http_res(const http_res_t *res) {
printf("--[ STATUS CODE: %i ]--\n", res->status_code);
printf("--[ REQUEST ]--\n%s\n--[ REQUEST ]--\n", res->request);
// res->data is not null-terminated so use write here
write(stdout, res->data, res->size);
write(1, res->data, res->size);
puts("--[ END ]--\n");
}

Expand All @@ -51,7 +51,6 @@ long parse_http_content_length(const char *buf) {
const char *content_length_start;
char *endptr;
long content_length;
char *tmp;

content_length_start = strstr(buf, CONTENT_LENGTH_HEADER);

Expand Down
4 changes: 1 addition & 3 deletions src/client/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,10 @@ int main() {
// return EXIT_FAILURE;
// };



// Print the fraction links
// TODO: Download each link to a file
for (int i = 0; i < lines_read; i++) {
// printf("%s\n", fraction_links[i]);
// printf("%s\n", fraction_links[i]);
free(fraction_links[i]); // Free allocated memory for each line
}

Expand Down

0 comments on commit e12a322

Please sign in to comment.