Skip to content

Commit

Permalink
Merge pull request #3 from vjardin/ReadCode
Browse files Browse the repository at this point in the history
  • Loading branch information
acassen authored Feb 3, 2024
2 parents 95f3b6d + d3d7e98 commit d66a209
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/include/gtp_bpf_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static inline unsigned int bpf_num_possible_cpus(void)
if (possible_cpus < 0) {
printf("Failed to get # of possible cpus: '%s'!\n",
strerror(-possible_cpus));
exit(1);
exit(EXIT_FAILURE);
}
return possible_cpus;
}
Expand All @@ -60,4 +60,4 @@ static inline unsigned int bpf_num_possible_cpus(void)
(offsetof(TYPE, MEMBER) + sizeof_field(TYPE, MEMBER))
#endif

#endif
#endif
12 changes: 6 additions & 6 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ stop_gtp(void)
#endif
closelog();
pidfile_rm(PROG_PID_FILE);
exit(0);
exit(EXIT_SUCCESS);
}

/* Daemon init sequence */
Expand Down Expand Up @@ -174,11 +174,11 @@ parse_cmdline(int argc, char **argv)
case 'v':
fprintf(stderr, VERSION_STRING "\n");
fprintf(stderr, "libbpf %s\n", libbpf_version_string());
exit(0);
exit(EXIT_SUCCESS);
break;
case 'h':
usage(argv[0]);
exit(0);
exit(EXIT_SUCCESS);
break;
case 'l':
debug |= 1;
Expand Down Expand Up @@ -216,7 +216,7 @@ parse_cmdline(int argc, char **argv)
bad_option = true;
break;
default:
exit(1);
exit(EXIT_FAILURE);
break;
}
curind = optind;
Expand All @@ -231,7 +231,7 @@ parse_cmdline(int argc, char **argv)
}

if (bad_option)
exit(1);
exit(EXIT_FAILURE);
}

/* Entry point */
Expand Down Expand Up @@ -296,5 +296,5 @@ main(int argc, char **argv)
*/
end:
closelog();
exit(0);
exit(EXIT_SUCCESS);
}

0 comments on commit d66a209

Please sign in to comment.