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