Changeset 6c441cf8 in mainline for kernel/generic/src/mm/frame.c


Ignore:
Timestamp:
2008-02-27T11:49:17Z (17 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
56976a17
Parents:
fdb7795
Message:

code cleanup (mostly signed/unsigned)
allow extra compiler warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/frame.c

    rfdb7795 r6c441cf8  
    121121static inline int frame_index_valid(zone_t *zone, index_t index)
    122122{
    123         return (index >= 0) && (index < zone->count);
     123        return (index < zone->count);
    124124}
    125125
     
    211211        spinlock_lock(&zones.lock);
    212212
    213         if (hint >= zones.count || hint < 0)
     213        if (hint >= zones.count)
    214214                hint = 0;
    215215       
     
    720720        spinlock_lock(&zones.lock);
    721721
    722         if (z1 < 0 || z1 >= zones.count || z2 < 0 || z2 >= zones.count)
     722        if ((z1 >= zones.count) || (z2 >= zones.count))
    723723                goto errout;
    724724        /* We can join only 2 zones with none existing inbetween */
Note: See TracChangeset for help on using the changeset viewer.