commit c4caaee88e58b02fae4d446ceb99147ed9ed3b0e from: Stefan Sperling date: Wed Apr 17 17:33:57 2024 UTC remove dead code under DEBUG_HTTP; ok op@ commit - e845266448678a874b53e7f9e0d16988815c2c92 commit + c4caaee88e58b02fae4d446ceb99147ed9ed3b0e blob - 384f347b929513263e880df54a09a6ba700b089e blob + 1cd6efe44c6ea8dbe180763fb07be941aa580ec2 --- libexec/got-fetch-http/got-fetch-http.c +++ libexec/got-fetch-http/got-fetch-http.c @@ -43,8 +43,6 @@ #define MINIMUM(a, b) ((a) < (b) ? (a) : (b)) #define hasprfx(str, p) (strncasecmp(str, p, strlen(p)) == 0) -#define DEBUG_HTTP 0 - FILE *tmp; static int verbose; @@ -242,9 +240,6 @@ http_parse_reply(struct bufio *bio, int *chunked, cons buf_drain(&bio->rbuf, linelen); break; } -#if DEBUG_HTTP - fprintf(stderr, "%s: %s\n", __func__, line); -#endif if (hasprfx(line, "content-type:")) { cp = strchr(line, ':') + 1; @@ -320,11 +315,6 @@ http_read(struct bufio *bio, int chunked, size_t *chun break; } -#if DEBUG_HTTP - if (tmp) - fwrite(buf, 1, r, tmp); - /* fwrite(buf, 1, r, stderr); */ -#endif ret += r; buf += r; bufsz -= r; @@ -532,7 +522,7 @@ main(int argc, char **argv) int https = 0; int ch; -#if !DEBUG_HTTP || defined(PROFILE) +#ifndef PROFILE if (pledge("stdio rpath inet dns unveil", NULL) == -1) err(1, "pledge"); #endif @@ -579,10 +569,6 @@ main(int argc, char **argv) if (get_refs(https, host, port, path) == -1) errx(1, "failed to get refs"); -#if DEBUG_HTTP - tmp = fopen("/tmp/pck", "w"); -#endif - pfd.fd = 0; pfd.events = POLLIN; if (poll(&pfd, 1, INFTIM) == -1)