remove code leftover from -i option - bmf - bmf (Bayesian Mail Filter) 0.9.4 fork + patches
(HTM) git clone git://git.codemadness.org/bmf
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 30cf7b5fcb8028582d3c746e9c72289be77c3f87
(DIR) parent 13b02490de8ddfe9a9ad66cc2484f7fd3a3b9278
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 22 Sep 2018 18:27:09 +0200
remove code leftover from -i option
Diffstat:
M bmf.c | 17 -----------------
1 file changed, 0 insertions(+), 17 deletions(-)
---
(DIR) diff --git a/bmf.c b/bmf.c
@@ -91,7 +91,6 @@ int main( int argc, char** argv )
bool_t is_spam = false;
int fd = STDIN_FILENO;
- char* infile = NULL;
if (pledge("stdio rpath wpath cpath tmppath", NULL) == -1)
err(1, "pledge");
@@ -161,17 +160,6 @@ int main( int argc, char** argv )
}
stats.extrema = (discrim_t*)malloc( stats.keepers*sizeof(discrim_t) );
- if( infile != NULL )
- {
- fd = open( infile, O_RDONLY );
- if( fd == -1 )
- {
- fprintf( stderr, "%s: cannot open input file '%s': %s\n",
- argv[0], infile, strerror(errno) );
- exit( 2 );
- }
- }
-
pdb = dbh_open( dbfmt, "localhost", dbname, "", "" );
if( pdb == NULL )
{
@@ -305,11 +293,6 @@ int main( int argc, char** argv )
pdb->close( pdb );
free( pdb );
- if( infile != NULL )
- {
- free( infile );
- close( fd );
- }
free( stats.extrema );
return ( (do_passthru || is_spam) ? 0 : 1 );