Navigation


Changeset 403:26aafbbc1640 in freeDiameter for freeDiameter/routing_dispatch.c


Ignore:
Timestamp:
Jul 8, 2010, 2:24:19 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Cleanup all compilation warnings in base code for 32 bit arch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freeDiameter/routing_dispatch.c

    r258 r403  
    269269                        if (dh
    270270                                && (dh->os.len == strlen(peer->p_hdr.info.pi_diamid))
    271                                 && (strncasecmp(peer->p_hdr.info.pi_diamid, dh->os.data, dh->os.len) == 0)) {
     271                                /* Here again we use strncasecmp on UTF8 data... This should probably be changed. */
     272                                && (strncasecmp(peer->p_hdr.info.pi_diamid, (char *)dh->os.data, dh->os.len) == 0)) {
    272273                                /* The candidate is the Destination-Host */
    273274                                c->score += FD_SCORE_FINALDEST;
     
    275276                                if (dr  && peer->p_hdr.info.runtime.pir_realm
    276277                                        && (dr->os.len == strlen(peer->p_hdr.info.runtime.pir_realm))
    277                                         && (strncasecmp(peer->p_hdr.info.runtime.pir_realm, dr->os.data, dr->os.len) == 0)) {
     278                                        /* Yet another case where we use strncasecmp on UTF8 data... Hmmm :-( */
     279                                        && (strncasecmp(peer->p_hdr.info.runtime.pir_realm, (char *)dr->os.data, dr->os.len) == 0)) {
    278280                                        /* The candidate's realm matchs the Destination-Realm */
    279281                                        c->score += FD_SCORE_REALM;
     
    355357static int process_decorated_NAI(union avp_value * un, union avp_value * dr)
    356358{
    357         int i, at_idx = 0, sep_idx = 0;
     359        int at_idx = 0, sep_idx = 0;
    358360        unsigned char * old_un;
    359361        TRACE_ENTRY("%p %p", un, dr);
     
    365367        /* Search the positions of the first '!' and the '@' in the string */
    366368        nai_get_indexes(un, &sep_idx, &at_idx);
    367         CHECK_PARAMS( 0 < sep_idx < at_idx < un->os.len);
     369        CHECK_PARAMS( (0 < sep_idx) && (sep_idx < at_idx) && (at_idx < un->os.len));
    368370       
    369371        /* Create the new User-Name value */
Note: See TracChangeset for help on using the changeset viewer.