Store fragment_size_message as a pointer
This commit is contained in:
parent
a5b185c2a9
commit
95765f3ed9
|
|
@ -39,7 +39,7 @@
|
||||||
#define SET_HTTP_FRAGMENT_SIZE_OPTION(fragment_size) do { \
|
#define SET_HTTP_FRAGMENT_SIZE_OPTION(fragment_size) do { \
|
||||||
if (!http_fragment_size) { \
|
if (!http_fragment_size) { \
|
||||||
if (fragment_size <= 0 || fragment_size > 65535) { \
|
if (fragment_size <= 0 || fragment_size > 65535) { \
|
||||||
printf(fragment_size_message); \
|
puts(fragment_size_message); \
|
||||||
exit(EXIT_FAILURE); \
|
exit(EXIT_FAILURE); \
|
||||||
} \
|
} \
|
||||||
http_fragment_size = fragment_size; \
|
http_fragment_size = fragment_size; \
|
||||||
|
|
@ -243,7 +243,7 @@ static PVOID find_http_method_end(const char *pkt, int http_frag, int *is_fragme
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
static const char fragment_size_message[] =
|
static const char *fragment_size_message =
|
||||||
"Fragment size should be in range [0 - 65535]\n";
|
"Fragment size should be in range [0 - 65535]\n";
|
||||||
int i, should_reinject, should_recalc_checksum = 0;
|
int i, should_reinject, should_recalc_checksum = 0;
|
||||||
int opt;
|
int opt;
|
||||||
|
|
@ -346,7 +346,7 @@ int main(int argc, char *argv[]) {
|
||||||
do_fragment_https = 1;
|
do_fragment_https = 1;
|
||||||
https_fragment_size = atoi(optarg);
|
https_fragment_size = atoi(optarg);
|
||||||
if (https_fragment_size <= 0 || https_fragment_size > 65535) {
|
if (https_fragment_size <= 0 || https_fragment_size > 65535) {
|
||||||
printf(fragment_size_message);
|
puts(fragment_size_message);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue