Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset c24b272f in mainline


Ignore:
Timestamp:
2011-12-09T23:13:21Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
7c3e482
Parents:
bb7e6fc5
Message:

Fix two off-by-one errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/lib/ra.c

    rbb7e6fc5 rc24b272f  
    160160        hash_table_create(&span->used, USED_BUCKETS, 1, &used_ops);
    161161
    162         for (i = 0; i < span->max_order; i++)
     162        for (i = 0; i <= span->max_order; i++)
    163163                list_initialize(&span->free[i]);
    164164
     
    257257                newbase = ALIGN_UP(seg->base, align);
    258258                if (newbase + size != seg->base + ra_segment_size_get(seg)) {
    259                         ASSERT(newbase + size < seg->base +
    260                             ra_segment_size_get(seg));
     259                        ASSERT(newbase + (size - 1) < seg->base +
     260                            (ra_segment_size_get(seg) - 1));
    261261                        succ = ra_segment_create(newbase + size);
    262262                        if (!succ) {
Note: See TracChangeset for help on using the changeset viewer.