/*
- * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
break;
case 'h':
usage();
- exit(0);
+ exit(EXIT_SUCCESS);
case '?':
opt = optopt;
/* fall thru to default */
}
}
if (had_error)
- exit(1);
+ exit(EXIT_FAILURE);
}
int
base64_decode_init(&ctx);
size_t dstLen = 0;
if (buflen > 3 &&
- base64_decode_update(&ctx, &dstLen, decodedBuf, buflen-3, reinterpret_cast<const uint8_t*>(buf+3)) &&
+ base64_decode_update(&ctx, &dstLen, decodedBuf, buflen-3, buf+3) &&
base64_decode_final(&ctx)) {
decodedLen = dstLen;
packet = (ntlmhdr*)decodedBuf;
struct base64_encode_ctx eCtx;
base64_encode_init(&eCtx);
- uint8_t *data = (uint8_t*)xcalloc(base64_encode_len(len), 1);
- size_t blen = base64_encode_update(&eCtx, data, len, reinterpret_cast<uint8_t*>(&chal));
+ char *data = static_cast<char *>(xcalloc(base64_encode_len(len), 1));
+ size_t blen = base64_encode_update(&eCtx, data, len, reinterpret_cast<const uint8_t *>(&chal));
blen += base64_encode_final(&eCtx, data+blen);
if (NTLM_packet_debug_enabled) {
printf("TT %.*s\n", (int)blen, data);
}
}
}
- exit(0);
+ return EXIT_SUCCESS;
}