Show
Ignore:
Timestamp:
05/05/08 15:00:01 (7 months ago)
Author:
ludovic.rousseau
Message:

Use size_t instead of int when needed, plus some other minor changes

Patch bug.1 included in Ticket #176

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/signer/dialog.c

    r3183 r3510  
    3737{ 
    3838        int r; 
     39        size_t len; 
    3940        const char *argv[3]; 
    4041        const char *pgmname = PIN_ENTRY; 
     
    7980                        goto err; 
    8081                } 
    81                 r = strlen(buf); 
    82                 if (r < pinfo->min_length) { 
     82                len = strlen(buf); 
     83                if (len < pinfo->min_length) { 
    8384                        sprintf(errtext, "PIN code too short, min. %lu digits", (unsigned long) pinfo->min_length); 
    8485                        continue; 
    8586                } 
    86                 if (r > pinfo->max_length) { 
     87                if (len > pinfo->max_length) { 
    8788                        sprintf(errtext, "PIN code too long, max. %lu digits", (unsigned long) pinfo->max_length); 
    8889                        continue;