From adc000f756fc9f0327b6564e178b638e60b8ad38 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Sun, 15 Apr 2001 21:39:37 +0000 Subject: regex doesn't set errno and regcomp returns 0 on success and any other 2001-04-15 Jeffrey Stedfast * camel-mime-utils.c (header_raw_check_mailing_list): regex doesn't set errno and regcomp returns 0 on success and any other value for an error (so don't *just* check for -1). svn path=/trunk/; revision=9333 --- camel/ChangeLog | 6 ++++++ camel/camel-mime-utils.c | 20 +++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) (limited to 'camel') diff --git a/camel/ChangeLog b/camel/ChangeLog index c4b0a513ab..dca89bc6a1 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2001-04-15 Jeffrey Stedfast + + * camel-mime-utils.c (header_raw_check_mailing_list): regex + doesn't set errno and regcomp returns 0 on success and any other + value for an error (so don't *just* check for -1). + 2001-04-14 Jeffrey Stedfast * camel-cipher-context.c: Check to make sure the context is a diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c index ed6589819f..1d873007f6 100644 --- a/camel/camel-mime-utils.c +++ b/camel/camel-mime-utils.c @@ -3056,11 +3056,21 @@ header_raw_check_mailing_list(struct _header_raw **list) const char *v; regex_t pattern; regmatch_t match[2]; - int i; - - for (i=0;i