commit cf87b1d1df52185fa21efde684c398a2d1c61d1d from: Stefan Sperling via: Thomas Adam date: Thu Apr 25 14:57:36 2024 UTC remove dead code under DEBUG_HTTP; ok op@ commit - a9a48d93a276ff55f1ad9902dd84b77c899fd027 commit + cf87b1d1df52185fa21efde684c398a2d1c61d1d 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)