Changeset e1ab30f8 in mainline


Ignore:
Timestamp:
2009-06-03T19:12:02Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d4a3ee5
Parents:
ee369f3
Message:

cstyle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/generic/as.c

    ree369f3 re1ab30f8  
    3131 */
    3232/** @file
    33  */ 
     33 */
    3434
    3535#include <as.h>
     
    103103static size_t maxheapsize = (size_t) (-1);
    104104
    105 static void * last_allocated = 0;
     105static void *last_allocated = 0;
    106106
    107107/* Start of heap linker symbol */
     
    120120       
    121121        /* Check for invalid values */
    122         if (incr < 0 && -incr > heapsize)
     122        if ((incr < 0) && (((size_t) -incr) > heapsize))
    123123                return NULL;
    124124       
    125125        /* Check for too large value */
    126         if (incr > 0 && incr+heapsize < heapsize)
     126        if ((incr > 0) && (incr + heapsize < heapsize))
    127127                return NULL;
    128128       
    129129        /* Check for too small values */
    130         if (incr < 0 && incr+heapsize > heapsize)
     130        if ((incr < 0) && (incr + heapsize > heapsize))
    131131                return NULL;
    132132       
     
    176176
    177177        /* Set heapsize to some meaningful value */
    178         if (maxheapsize == -1)
     178        if (maxheapsize == (size_t) -1)
    179179                set_maxheapsize(MAX_HEAP_SIZE);
    180180       
Note: See TracChangeset for help on using the changeset viewer.