Skip to content

Commit

Permalink
Removing debug printfs
Browse files Browse the repository at this point in the history
  • Loading branch information
msoulier committed Oct 29, 2024
1 parent 2b57bfc commit 4ef376c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion muri.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ main(int argc, char *argv[]) {
if (input_buffer[strnlen(input_buffer, maximum_read)-1] == '\n') {
input_buffer[strnlen(input_buffer, maximum_read)-1] = '\0';
} // FIXME if not then we didn't read all of stdin
printf("'%s'\n", input_buffer);
} else {
if (strncmp(argv[1], "-h", 2) == 0) {
fprintf(stderr, "Usage: %s [string]\nIf [string] not provided, reads from stdin.\n", argv[0]);
Expand Down
5 changes: 1 addition & 4 deletions mutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,19 +319,16 @@ char *tohex(const unsigned char *in,
}

char *uriencode(const char *in, int *out_length) {
printf("in is %s\n", in);
char *out_string = NULL;
size_t max_output = CURL_MAX_READ_SIZE*3;
CURL *curl = curl_easy_init();
char *c_encoded = curl_easy_escape(curl, in, 0);
printf("c_encoded is %s\n", c_encoded);
*out_length = strnlen(c_encoded, max_output);
out_string = malloc(*out_length*sizeof(char));
if (out_string == NULL) {
goto CLEANUP;
}
strncpy(out_string, c_encoded, *out_length);
printf("copied to out_string: %s\n", out_string);
CLEANUP:
curl_free(c_encoded);
curl_easy_cleanup(curl);
Expand All @@ -353,4 +350,4 @@ char *uriencode(const char *in, int *out_length) {
curl_free(c_decoded);
curl_easy_cleanup(curl);
return out_string;
}
}

0 comments on commit 4ef376c

Please sign in to comment.