Skip to content

Commit bf1d8b2

Browse files
authored
Merge pull request #5 from infrastation/master
fix some simple warnings
2 parents c21985c + 7e67b9a commit bf1d8b2

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

src/sn_logfile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ LogFILE=fopen(Logfile,"a");
9393
if(LogFILE==NULL)
9494
printf("Sniffit heartattack.. couldn't create/open logfile...\n"), exit(1);
9595
exit_func(logfile_exit);
96-
fchmod(LogFILE, S_IWUSR|S_IRUSR);
96+
chmod(Logfile, S_IWUSR|S_IRUSR);
9797
print_logline("Sniffit session started.");
9898
printf("Sniffit Logging started.\n");
9999
}

src/sniffit.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ void quit (char *prog_name) /* Learn to use the program */
9999
void close_dumpfile(void) {pcap_dump_close(dev_dump);};
100100
void close_pcapdev(void) {pcap_close(dev_desc);};
101101

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

1801-
#ifdef PLUGIN0_INIT()
1801+
#ifdef PLUGIN0_INIT
18021802
if (Plugin_Active[0] == 1)
18031803
PLUGIN0_INIT ();
18041804
#endif
1805-
#ifdef PLUGIN1_INIT()
1805+
#ifdef PLUGIN1_INIT
18061806
if (Plugin_Active[1] == 1)
18071807
PLUGIN1_INIT ();
18081808
#endif
1809-
#ifdef PLUGIN2_INIT()
1809+
#ifdef PLUGIN2_INIT
18101810
if (Plugin_Active[2] == 1)
18111811
PLUGIN2_INIT ();
18121812
#endif
1813-
#ifdef PLUGIN3_INIT()
1813+
#ifdef PLUGIN3_INIT
18141814
if (Plugin_Active[3] == 1)
18151815
PLUGIN3_INIT ();
18161816
#endif
1817-
#ifdef PLUGIN4_INIT()
1817+
#ifdef PLUGIN4_INIT
18181818
if (Plugin_Active[4] == 1)
18191819
PLUGIN4_INIT ();
18201820
#endif
1821-
#ifdef PLUGIN5_INIT()
1821+
#ifdef PLUGIN5_INIT
18221822
if (Plugin_Active[5] == 1)
18231823
PLUGIN5_INIT ();
18241824
#endif
1825-
#ifdef PLUGIN6_INIT()
1825+
#ifdef PLUGIN6_INIT
18261826
if (Plugin_Active[6] == 1)
18271827
PLUGIN6_INIT ();
18281828
#endif
1829-
#ifdef PLUGIN7_INIT()
1829+
#ifdef PLUGIN7_INIT
18301830
if (Plugin_Active[7] == 1)
18311831
PLUGIN7_INIT ();
18321832
#endif
1833-
#ifdef PLUGIN8_INIT()
1833+
#ifdef PLUGIN8_INIT
18341834
if (Plugin_Active[8] == 1)
18351835
PLUGIN8_INIT ();
18361836
#endif
1837-
#ifdef PLUGIN9_INIT()
1837+
#ifdef PLUGIN9_INIT
18381838
if (Plugin_Active[9] == 1)
18391839
PLUGIN9_INIT ();
18401840
#endif

src/sniffit.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ void record_buf(struct file_info *, _32_bit, char *, int, int);
2626
void sb_shift(struct file_info *);
2727
void sbuf_update(struct file_info *, _32_bit, char *, int);
2828
struct file_info *search_dynam(char *, char);
29-
void my_exit (void);
3029

3130
/**** Sniffit functions (plugins) *******************************************/
3231
void start_plugin (int, struct Plugin_data *);

0 commit comments

Comments
 (0)