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