Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up 'return' never will be executed. #3096

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ struct data_ms {
};


static void *process_request(void *data) {
[[noreturn]] static void *process_request(void *data) {
struct data_ms *a = (struct data_ms *)data;
modsecurity::ModSecurity *modsec = a->modsec;
modsecurity::RulesSet *rules = a->rules;
Expand Down Expand Up @@ -102,8 +102,7 @@ static void *process_request(void *data) {
delete modsecTransaction;
}

pthread_exit(NULL);
return NULL;
gberkes marked this conversation as resolved.
Show resolved Hide resolved
pthread_exit(nullptr);
}


Expand Down Expand Up @@ -165,7 +164,6 @@ class ReadingLogsViaRuleMessage {

delete rules;
delete modsec;
pthread_exit(NULL);
return 0;
}

Expand Down
3 changes: 0 additions & 3 deletions examples/reading_logs_via_rule_message/simple_request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,5 @@ int main(int argc, char **argv) {
response_headers, response_body, ip, rules);
rlvrm.process();



pthread_exit(NULL);
return 0;
}
Loading