Changes in kernel/generic/src/sysinfo/sysinfo.c [68f4671:2a08005] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/sysinfo/sysinfo.c
r68f4671 r2a08005 34 34 */ 35 35 36 #include <assert.h>37 36 #include <sysinfo/sysinfo.h> 38 37 #include <mm/slab.h> … … 126 125 sysinfo_item_t *subtree, sysinfo_return_t **ret, bool dry_run) 127 126 { 128 assert(subtree != NULL);127 ASSERT(subtree != NULL); 129 128 130 129 sysinfo_item_t *cur = subtree; … … 192 191 sysinfo_item_t **psubtree) 193 192 { 194 assert(psubtree != NULL);193 ASSERT(psubtree != NULL); 195 194 196 195 if (*psubtree == NULL) { … … 205 204 *psubtree = 206 205 (sysinfo_item_t *) slab_alloc(sysinfo_item_slab, 0); 207 assert(*psubtree);206 ASSERT(*psubtree); 208 207 209 208 /* Fill in item name up to the delimiter */ 210 209 (*psubtree)->name = str_ndup(name, i); 211 assert((*psubtree)->name);210 ASSERT((*psubtree)->name); 212 211 213 212 /* Create subtree items */ … … 269 268 sysinfo_item_t *item = 270 269 (sysinfo_item_t *) slab_alloc(sysinfo_item_slab, 0); 271 assert(item);270 ASSERT(item); 272 271 273 272 cur->next = item; … … 275 274 /* Fill in item name up to the delimiter */ 276 275 item->name = str_ndup(name, i); 277 assert(item->name);276 ASSERT(item->name); 278 277 279 278 /* Create subtree items */ … … 292 291 293 292 /* Unreachable */ 294 assert(false);293 ASSERT(false); 295 294 return NULL; 296 295 } … … 650 649 651 650 char *path = (char *) malloc(size + 1, 0); 652 assert(path);651 ASSERT(path); 653 652 654 653 if ((copy_from_uspace(path, ptr, size + 1) == 0) && … … 700 699 701 700 sysinfo_return_t ret; 702 ret.tag = SYSINFO_VAL_UNDEFINED;703 701 704 702 if (subtree != NULL) { … … 731 729 ret.data.size = size; 732 730 } 731 } else { 732 /* No item in the fixed sysinfo tree */ 733 ret.tag = SYSINFO_VAL_UNDEFINED; 733 734 } 734 735 … … 759 760 760 761 char *path = (char *) malloc(size + 1, 0); 761 assert(path);762 ASSERT(path); 762 763 763 764 if ((copy_from_uspace(path, ptr, size + 1) == 0) &&
Note:
See TracChangeset
for help on using the changeset viewer.