Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/sysinfo/sysinfo.c

    r68f4671 r2a08005  
    3434 */
    3535
    36 #include <assert.h>
    3736#include <sysinfo/sysinfo.h>
    3837#include <mm/slab.h>
     
    126125    sysinfo_item_t *subtree, sysinfo_return_t **ret, bool dry_run)
    127126{
    128         assert(subtree != NULL);
     127        ASSERT(subtree != NULL);
    129128       
    130129        sysinfo_item_t *cur = subtree;
     
    192191    sysinfo_item_t **psubtree)
    193192{
    194         assert(psubtree != NULL);
     193        ASSERT(psubtree != NULL);
    195194       
    196195        if (*psubtree == NULL) {
     
    205204                *psubtree =
    206205                    (sysinfo_item_t *) slab_alloc(sysinfo_item_slab, 0);
    207                 assert(*psubtree);
     206                ASSERT(*psubtree);
    208207               
    209208                /* Fill in item name up to the delimiter */
    210209                (*psubtree)->name = str_ndup(name, i);
    211                 assert((*psubtree)->name);
     210                ASSERT((*psubtree)->name);
    212211               
    213212                /* Create subtree items */
     
    269268                        sysinfo_item_t *item =
    270269                            (sysinfo_item_t *) slab_alloc(sysinfo_item_slab, 0);
    271                         assert(item);
     270                        ASSERT(item);
    272271                       
    273272                        cur->next = item;
     
    275274                        /* Fill in item name up to the delimiter */
    276275                        item->name = str_ndup(name, i);
    277                         assert(item->name);
     276                        ASSERT(item->name);
    278277                       
    279278                        /* Create subtree items */
     
    292291       
    293292        /* Unreachable */
    294         assert(false);
     293        ASSERT(false);
    295294        return NULL;
    296295}
     
    650649       
    651650        char *path = (char *) malloc(size + 1, 0);
    652         assert(path);
     651        ASSERT(path);
    653652       
    654653        if ((copy_from_uspace(path, ptr, size + 1) == 0) &&
     
    700699       
    701700        sysinfo_return_t ret;
    702         ret.tag = SYSINFO_VAL_UNDEFINED;
    703701       
    704702        if (subtree != NULL) {
     
    731729                        ret.data.size = size;
    732730                }
     731        } else {
     732                /* No item in the fixed sysinfo tree */
     733                ret.tag = SYSINFO_VAL_UNDEFINED;
    733734        }
    734735       
     
    759760       
    760761        char *path = (char *) malloc(size + 1, 0);
    761         assert(path);
     762        ASSERT(path);
    762763       
    763764        if ((copy_from_uspace(path, ptr, size + 1) == 0) &&
Note: See TracChangeset for help on using the changeset viewer.