Changes in kernel/generic/src/lib/str.c [1772e6d:63e27ef] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/lib/str.c
r1772e6d r63e27ef 109 109 #include <errno.h> 110 110 #include <align.h> 111 #include < debug.h>111 #include <assert.h> 112 112 #include <macros.h> 113 #include <mm/slab.h> 113 114 114 115 /** Check the condition if wchar_t is signed */ … … 566 567 { 567 568 /* There must be space for a null terminator in the buffer. */ 568 ASSERT(size > 0); 569 assert(size > 0); 570 assert(src != NULL); 569 571 570 572 size_t src_off = 0; … … 599 601 { 600 602 /* There must be space for a null terminator in the buffer. */ 601 ASSERT(size > 0);603 assert(size > 0); 602 604 603 605 size_t src_off = 0; … … 633 635 size_t size = str_size(src) + 1; 634 636 char *dest = malloc(size, 0); 635 ASSERT(dest);637 assert(dest); 636 638 637 639 str_cpy(dest, size, src); … … 666 668 667 669 char *dest = malloc(size + 1, 0); 668 ASSERT(dest);670 assert(dest); 669 671 670 672 str_ncpy(dest, size + 1, src, size); … … 689 691 690 692 /* There must be space for a null terminator in the buffer. */ 691 ASSERT(size > 0);693 assert(size > 0); 692 694 693 695 src_idx = 0; … … 795 797 bool *neg, uint64_t *result) 796 798 { 797 ASSERT(endptr != NULL);798 ASSERT(neg != NULL);799 ASSERT(result != NULL);799 assert(endptr != NULL); 800 assert(neg != NULL); 801 assert(result != NULL); 800 802 801 803 *neg = false; … … 916 918 bool strict, uint64_t *result) 917 919 { 918 ASSERT(result != NULL);920 assert(result != NULL); 919 921 920 922 bool neg;
Note:
See TracChangeset
for help on using the changeset viewer.