From ec998f2bbc71aea870948abf762bc23b3ff9c85c Mon Sep 17 00:00:00 2001 From: Tom Kistner Date: Mon, 27 Jun 2005 18:10:30 +0000 Subject: [PATCH] Fixed some compiler warnings --- src/src/srs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/src/srs.c b/src/src/srs.c index e534943b3..69f35bf99 100644 --- a/src/src/srs.c +++ b/src/src/srs.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/srs.c,v 1.7 2005/05/25 17:50:33 tom Exp $ */ +/* $Cambridge: exim/src/src/srs.c,v 1.8 2005/06/27 18:10:30 tom Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -29,7 +29,7 @@ int eximsrs_init() { uschar *list = srs_config; uschar secret_buf[SRS_MAX_SECRET_LENGTH]; - uschar *secret; + uschar *secret = NULL; uschar sbuf[4]; uschar *sbufp; @@ -71,7 +71,7 @@ int eximsrs_init() /* First secret specified in secrets? */ co = 0; list = srs_secrets; - if(secret == NULL || *secret == NULL) + if(secret == NULL || *secret == '\0') { if((secret = string_nextinlist(&list, &co, secret_buf, SRS_MAX_SECRET_LENGTH)) == NULL) { @@ -107,7 +107,7 @@ int eximsrs_init() /* Extra secrets? */ while((secret = string_nextinlist(&list, &co, secret_buf, SRS_MAX_SECRET_LENGTH)) != NULL) - srs_add_secret(srs, secret, strnlen(secret, SRS_MAX_SECRET_LENGTH)); + srs_add_secret(srs, secret, (Ustrlen(secret) > SRS_MAX_SECRET_LENGTH) ? SRS_MAX_SECRET_LENGTH : Ustrlen(secret)); DEBUG(D_any) debug_printf("SRS initialized\n"); -- 2.25.1