httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dr...@apache.org
Subject cvs commit: httpd-2.0/support htpasswd.c
Date Sun, 25 Feb 2001 15:27:07 GMT
dreid       01/02/25 07:27:07

  Modified:    support  htpasswd.c
  Log:
  Use a better format type for sizeof.  This stops a few compiler
  warnings.
  
  Revision  Changes    Path
  1.36      +6 -6      httpd-2.0/support/htpasswd.c
  
  Index: htpasswd.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/support/htpasswd.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- htpasswd.c	2001/02/16 04:26:53	1.35
  +++ htpasswd.c	2001/02/25 15:27:07	1.36
  @@ -215,8 +215,8 @@
       else {
           bufsize = sizeof(pwin);
   	if (apr_password_get("New password: ", pwin, &bufsize) != 0) {
  -	    apr_snprintf(record, (rlen - 1), "password too long (>%d)",
  -			sizeof(pwin) - 1);
  +	    apr_snprintf(record, (rlen - 1), "password too long (>%" APR_SIZE_T_FMT
  +	        ")", sizeof(pwin) - 1);
   	    return ERR_OVERFLOW;
   	}
           bufsize = sizeof(pwv);
  @@ -492,8 +492,8 @@
   	}
   	strcpy(pwfilename, argv[i]);
   	if (strlen(argv[i + 1]) > (sizeof(user) - 1)) {
  -	    fprintf(stderr, "%s: username too long (>%d)\n", argv[0],
  -		    sizeof(user) - 1);
  +	    fprintf(stderr, "%s: username too long (>%" APR_SIZE_T_FMT ")\n",
  +	        argv[0], sizeof(user) - 1);
   	    return ERR_OVERFLOW;
   	}
       }
  @@ -505,8 +505,8 @@
       }
       if (noninteractive) {
   	if (strlen(argv[i + 2]) > (sizeof(password) - 1)) {
  -	    fprintf(stderr, "%s: password too long (>%d)\n", argv[0],
  -		    sizeof(password) - 1);
  +	    fprintf(stderr, "%s: password too long (>%" APR_SIZE_T_FMT ")\n",
  +	        argv[0], sizeof(password) - 1);
   	    return ERR_OVERFLOW;
   	}
   	strcpy(password, argv[i + 2]);
  
  
  

Mime
View raw message