Changeset 3b6eadc for storage_xml.c


Ignore:
Timestamp:
2007-07-07T17:19:28Z (13 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
b9e4ab5
Parents:
f7b44f2
Message:

Fix some warnings in storage.c.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • storage_xml.c

    rf7b44f2 r3b6eadc  
    132132        {
    133133                char *protocol, *handle, *server, *password = NULL, *autoconnect;
    134                 char *pass_b64 = NULL, *pass_rc4 = NULL;
     134                char *pass_b64 = NULL;
     135                unsigned char *pass_rc4 = NULL;
    135136                int pass_len;
    136137                struct prpl *prpl = NULL;
     
    152153                                     "Unknown protocol: %s", protocol );
    153154                else if( ( pass_len = base64_decode( pass_b64, (unsigned char**) &pass_rc4 ) ) &&
    154                                 rc4_decode( (unsigned char*) pass_rc4, pass_len,
    155                                             (unsigned char**) &password, xd->given_pass ) )
     155                                rc4_decode( pass_rc4, pass_len,
     156                                            &password,
     157                                                                        xd->given_pass ) )
    156158                {
    157159                        xd->current_account = account_add( irc, prpl, handle, password );
     
    410412        md5_finish( &md5_state, pass_md5 );
    411413        /* Save the hash in base64-encoded form. */
    412         pass_buf = base64_encode( (char*) pass_md5, 21 );
     414        pass_buf = base64_encode( pass_md5, 21 );
    413415       
    414416        if( !xml_printf( fd, 0, "<user nick=\"%s\" password=\"%s\" version=\"%d\">\n", irc->nick, pass_buf, XML_FORMAT_VERSION ) )
     
    424426        for( acc = irc->accounts; acc; acc = acc->next )
    425427        {
    426                 char *pass_rc4, *pass_b64;
     428                unsigned char *pass_rc4;
     429                char *pass_b64;
    427430                int pass_len;
    428431               
    429                 pass_len = rc4_encode( (unsigned char*) acc->pass, strlen( acc->pass ), (unsigned char**) &pass_rc4, irc->password );
     432                pass_len = rc4_encode( acc->pass, strlen( acc->pass ), (unsigned char**) &pass_rc4, irc->password );
    430433                pass_b64 = base64_encode( pass_rc4, pass_len );
    431434                g_free( pass_rc4 );
Note: See TracChangeset for help on using the changeset viewer.