Skip to content

Commit

Permalink
fix initialization warning, and remove changes submitted in bryanpkc#4
Browse files Browse the repository at this point in the history
  • Loading branch information
csl04r committed Dec 3, 2018
1 parent 3c17943 commit ed075bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions corkscrew.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,21 +195,22 @@ char *argv[];
size_t b64_buf_len;

port = 80;
csock = -1;

// start with a reasonable guess,
// the base64_encode function will resize if necessary
b64_buf_len = 1024;
b64_buf = malloc(b64_buf_len);

if (argc == 5 || argc == 6) {
if ((argc == 5) || (argc == 6)) {
if (argc == 5) {
host = argv[1];
port = atoi(argv[2]);
desthost = argv[3];
destport = argv[4];
up = getenv("CORKSCREW_AUTH");
}
if (argc == 6) {
if ((argc == 6)) {
host = argv[1];
port = atoi(argv[2]);
desthost = argv[3];
Expand Down Expand Up @@ -286,7 +287,6 @@ char *argv[];
if (len<=0)
break;
else {
memset(descr, 0, sizeof(descr));
sscanf(buffer,"%s%d%[^\n]",version,&code,descr);
if ((strncmp(version,"HTTP/",5) == 0) && (code >= 200) && (code < 300))
setup = 1;
Expand Down

0 comments on commit ed075bd

Please sign in to comment.