From ec4184ed9f58c62f319b3c9d3b83c9f25cd69d79 Mon Sep 17 00:00:00 2001 From: Stephan Bosch <stephan@rename-it.nl> Date: Sun, 25 Nov 2007 16:59:01 +0100 Subject: [PATCH] Minor changes to the executables. --- src/sieve-bin/bin-common.c | 3 ++- src/sieve-bin/sieve-exec.c | 2 +- src/sieve-bin/sieve-test.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/sieve-bin/bin-common.c b/src/sieve-bin/bin-common.c index 268da6d75..3b61de1b9 100644 --- a/src/sieve-bin/bin-common.c +++ b/src/sieve-bin/bin-common.c @@ -22,7 +22,8 @@ static void sig_die(int signo, void *context ATTR_UNUSED) which is too common at least while testing :) */ if (signo != SIGINT) i_warning("Killed with signal %d", signo); - io_loop_stop(ioloop); + // io_loop_stop(ioloop); We are not running an ioloop + exit(1); } void bin_init(void) diff --git a/src/sieve-bin/sieve-exec.c b/src/sieve-bin/sieve-exec.c index a4e8b9108..0682e4fbf 100644 --- a/src/sieve-bin/sieve-exec.c +++ b/src/sieve-bin/sieve-exec.c @@ -55,7 +55,7 @@ int main(int argc, char **argv) if ( argc > 2 ) { - if ( *(argv[2]) == '-' && *(argv[2]+1) == '\0' ) + if ( strcmp(argv[2], "-") == 0 ) mfd = 0; else { if ( (mfd = open(argv[2], O_RDONLY)) < 0 ) { diff --git a/src/sieve-bin/sieve-test.c b/src/sieve-bin/sieve-test.c index 1b35a543e..7d8a00ca5 100644 --- a/src/sieve-bin/sieve-test.c +++ b/src/sieve-bin/sieve-test.c @@ -36,7 +36,7 @@ int main(int argc, char **argv) /* Open mail file */ if ( argc > 2 ) { - if ( *(argv[2]) == '-' && *(argv[2]+1) == '\0' ) + if ( strcmp(argv[2], "-") == 0 ) mfd = 0; else { if ( (mfd = open(argv[2], O_RDONLY)) < 0 ) { -- GitLab