src/pEpEngine.c
changeset 1559 c6506bc6a0df
parent 1523 bc4a9401af51
child 1568 4af26e1915f1
     1.1 --- a/src/pEpEngine.c	Thu Jan 26 18:19:09 2017 +0100
     1.2 +++ b/src/pEpEngine.c	Thu Jan 26 19:07:45 2017 +0100
     1.3 @@ -844,9 +844,6 @@
     1.4      )
     1.5  {
     1.6      const char *source = fingerprint;
     1.7 -    char *buffer;
     1.8 -    char *dest;
     1.9 -    size_t fsize;
    1.10  
    1.11      assert(session);
    1.12      assert(fingerprint);
    1.13 @@ -860,13 +857,13 @@
    1.14      *words = NULL;
    1.15      *wsize = 0;
    1.16  
    1.17 -    buffer = calloc(1, MAX_TRUSTWORDS_SPACE);
    1.18 +    char *buffer = calloc(1, MAX_TRUSTWORDS_SPACE);
    1.19      assert(buffer);
    1.20      if (buffer == NULL)
    1.21          return PEP_OUT_OF_MEMORY;
    1.22 -    dest = buffer;
    1.23 +    char *dest = buffer;
    1.24  
    1.25 -    fsize = strlen(fingerprint);
    1.26 +    const size_t fsize = strlen(fingerprint);
    1.27  
    1.28      if (!lang || !lang[0])
    1.29          lang = "en";
    1.30 @@ -881,8 +878,8 @@
    1.31      while (source < fingerprint + fsize) {
    1.32          PEP_STATUS _status;
    1.33          uint16_t value;
    1.34 -        char *word;
    1.35 -        size_t _wsize;
    1.36 +        char *word = NULL;
    1.37 +        size_t _wsize = 0;
    1.38          int j;
    1.39  
    1.40          for (value=0, j=0; j < 4 && source < fingerprint + fsize; ) {