Skip to content

Commit 74c326c

Browse files
committed
Make die noreturn
1 parent b132701 commit 74c326c

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

proxy.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ void handle_connections_in_event_loop(struct event_loop_args* args) {
7171
DEBUG_LOG("epoll_wait returned %d", num_events);
7272
if (num_events < 0) {
7373
die(hsprintf("epoll_wait error: %s", errno2s(errno)));
74-
break;
7574
}
7675

7776
for (int i = 0; i < num_events; i++) {
@@ -126,7 +125,6 @@ int read_blacklist(const char* blacklist_path, char*** blacklist_ptr) {
126125
while (1) {
127126
if (blacklist_len >= MAX_BLACKLIST_LEN) {
128127
die("too many entries in the blacklist. Only up to 100 is supported.");
129-
return -1;
130128
}
131129

132130
if (getline(&blacklist[blacklist_len], &buffer_len, fp) == -1) {

util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
char* hsprintf(const char* fmt, ...);
55
char* errno2s(int errnum);
6-
void die(const char* message);
6+
__attribute__((noreturn)) void die(const char* message);
77

88
#endif // HTTPS_PROXY_UTIL_H

0 commit comments

Comments
 (0)