Skip to content

Commit

Permalink
Merge pull request #5 from infrastation/master
Browse files Browse the repository at this point in the history
fix some simple warnings
  • Loading branch information
eribertomota authored Sep 18, 2024
2 parents c21985c + 7e67b9a commit bf1d8b2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/sn_logfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ LogFILE=fopen(Logfile,"a");
if(LogFILE==NULL)
printf("Sniffit heartattack.. couldn't create/open logfile...\n"), exit(1);
exit_func(logfile_exit);
fchmod(LogFILE, S_IWUSR|S_IRUSR);
chmod(Logfile, S_IWUSR|S_IRUSR);
print_logline("Sniffit session started.");
printf("Sniffit Logging started.\n");
}
Expand Down
22 changes: 11 additions & 11 deletions src/sniffit.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void quit (char *prog_name) /* Learn to use the program */
void close_dumpfile(void) {pcap_dump_close(dev_dump);};
void close_pcapdev(void) {pcap_close(dev_desc);};

void my_exit (void)
static void my_exit (int signo)
{
fflush(NULL);
printf("Graceful shutdown...\n");
Expand Down Expand Up @@ -1798,43 +1798,43 @@ int main (int argc, char *argv[])
exit_func(close_pcapdev);
if(FORCE_DEV!=0) {free(dev);} /* no longer needed */

#ifdef PLUGIN0_INIT()
#ifdef PLUGIN0_INIT
if (Plugin_Active[0] == 1)
PLUGIN0_INIT ();
#endif
#ifdef PLUGIN1_INIT()
#ifdef PLUGIN1_INIT
if (Plugin_Active[1] == 1)
PLUGIN1_INIT ();
#endif
#ifdef PLUGIN2_INIT()
#ifdef PLUGIN2_INIT
if (Plugin_Active[2] == 1)
PLUGIN2_INIT ();
#endif
#ifdef PLUGIN3_INIT()
#ifdef PLUGIN3_INIT
if (Plugin_Active[3] == 1)
PLUGIN3_INIT ();
#endif
#ifdef PLUGIN4_INIT()
#ifdef PLUGIN4_INIT
if (Plugin_Active[4] == 1)
PLUGIN4_INIT ();
#endif
#ifdef PLUGIN5_INIT()
#ifdef PLUGIN5_INIT
if (Plugin_Active[5] == 1)
PLUGIN5_INIT ();
#endif
#ifdef PLUGIN6_INIT()
#ifdef PLUGIN6_INIT
if (Plugin_Active[6] == 1)
PLUGIN6_INIT ();
#endif
#ifdef PLUGIN7_INIT()
#ifdef PLUGIN7_INIT
if (Plugin_Active[7] == 1)
PLUGIN7_INIT ();
#endif
#ifdef PLUGIN8_INIT()
#ifdef PLUGIN8_INIT
if (Plugin_Active[8] == 1)
PLUGIN8_INIT ();
#endif
#ifdef PLUGIN9_INIT()
#ifdef PLUGIN9_INIT
if (Plugin_Active[9] == 1)
PLUGIN9_INIT ();
#endif
Expand Down
1 change: 0 additions & 1 deletion src/sniffit.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ void record_buf(struct file_info *, _32_bit, char *, int, int);
void sb_shift(struct file_info *);
void sbuf_update(struct file_info *, _32_bit, char *, int);
struct file_info *search_dynam(char *, char);
void my_exit (void);

/**** Sniffit functions (plugins) *******************************************/
void start_plugin (int, struct Plugin_data *);
Expand Down

0 comments on commit bf1d8b2

Please sign in to comment.