[exim-cvs] cvs commit: exim/exim-src/src srs.c

Etusivu
Poista viesti
Vastaa
Lähettäjä: Tom Kistner
Päiväys:  
Vastaanottaja: exim-cvs
Aihe: [exim-cvs] cvs commit: exim/exim-src/src srs.c
tom 2005/06/27 19:10:30 BST

  Modified files:
    exim-src/src         srs.c 
  Log:
  Fixed some compiler warnings


  Revision  Changes    Path
  1.8       +3 -3      exim/exim-src/src/srs.c


  Index: srs.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/srs.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- srs.c    25 May 2005 17:50:33 -0000    1.7
  +++ srs.c    27 Jun 2005 18:10:30 -0000    1.8
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/srs.c,v 1.7 2005/05/25 17:50:33 tom Exp $ */
  +/* $Cambridge: exim/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 @@
   {
     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 @@
       /* 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 @@


       /* 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");