Changeset 843 in openpam for trunk/lib


Ignore:
Timestamp:
Nov 25, 2014, 10:35:19 AM (6 years ago)
Author:
Dag-Erling Smørgrav
Message:

Fix a few cases where we incorrectly (and needlessly) cast away const
qualifiers.

Location:
trunk/lib/liboath
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/liboath/oath_base32.c

    r799 r843  
    8888base32_enc(const char *cin, size_t ilen, char *out, size_t *olen)
    8989{
    90         const uint8_t *in = (uint8_t *)cin;
     90        const uint8_t *in = (const uint8_t *)cin;
    9191        uint64_t bits;
    9292
     
    164164base32_dec(const char *cin, size_t ilen, char *out, size_t *olen)
    165165{
    166         const uint8_t *in = (uint8_t *)cin;
     166        const uint8_t *in = (const uint8_t *)cin;
    167167        size_t len;
    168168        int bits, shift, padding;
  • trunk/lib/liboath/oath_base64.c

    r799 r843  
    9090base64_enc(const char *cin, size_t ilen, char *out, size_t *olen)
    9191{
    92         const uint8_t *in = (uint8_t *)cin;
     92        const uint8_t *in = (const uint8_t *)cin;
    9393        uint32_t bits;
    9494
     
    152152base64_dec(const char *cin, size_t ilen, char *out, size_t *olen)
    153153{
    154         const uint8_t *in = (uint8_t *)cin;
     154        const uint8_t *in = (const uint8_t *)cin;
    155155        size_t len;
    156156        int bits, shift, padding;
  • trunk/lib/liboath/oath_key.c

    r799 r843  
    9494        }
    9595        uri = tmp;
    96         if (base32_enc((char *)key->key, key->keylen, uri + urilen, &kslen) != 0) {
     96        if (base32_enc((const char *)key->key, key->keylen, uri + urilen, &kslen) != 0) {
    9797                free(uri);
    9898                return (NULL);
Note: See TracChangeset for help on using the changeset viewer.