Changeset 1eddf6b for nick.c


Ignore:
Timestamp:
2005-12-08T12:30:43Z (19 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
c2295f7
Parents:
c3ffa45
Message:

Add some const

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nick.c

    rc3ffa45 r1eddf6b  
    2727#include "bitlbee.h"
    2828
    29 void nick_set( irc_t *irc, char *handle, int proto, char *nick )
     29void nick_set( irc_t *irc, const char *handle, int proto, const char *nick )
    3030{
    3131        nick_t *m = NULL, *n = irc->nicks;
     
    5656}
    5757
    58 char *nick_get( irc_t *irc, char *handle, int proto, const char *realname )
     58char *nick_get( irc_t *irc, const char *handle, int proto, const char *realname )
    5959{
    6060        static char nick[MAX_NICK_LENGTH+1];
     
    129129}
    130130
    131 void nick_del( irc_t *irc, char *nick )
     131void nick_del( irc_t *irc, const char *nick )
    132132{
    133133        nick_t *l = NULL, *n = irc->nicks;
     
    176176}
    177177
    178 int nick_ok( char *nick )
    179 {
    180         char *s;
     178int nick_ok( const char *nick )
     179{
     180        const char *s;
    181181       
    182182        /* Empty/long nicks are not allowed */
     
    237237}
    238238
    239 int nick_cmp( char *a, char *b )
     239int nick_cmp( const char *a, const char *b )
    240240{
    241241        char aa[1024] = "", bb[1024] = "";
     
    253253}
    254254
    255 char *nick_dup( char *nick )
    256 {
    257         char *cp;
    258        
    259         cp = g_new0 ( char, MAX_NICK_LENGTH + 1 );
    260         strncpy( cp, nick, MAX_NICK_LENGTH );
    261        
    262         return( cp );
    263 }
     255char *nick_dup( const char *nick )
     256{
     257        return g_strndup( nick, MAX_NICK_LENGTH );
     258}
Note: See TracChangeset for help on using the changeset viewer.