Changeset 63e27ef in mainline for kernel/generic/src/lib/str.c
- Timestamp:
- 2017-06-19T21:47:42Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- deacc58d
- Parents:
- 7354b5e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/lib/str.c
r7354b5e 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 113 #include <mm/slab.h> … … 567 567 { 568 568 /* There must be space for a null terminator in the buffer. */ 569 ASSERT(size > 0);570 ASSERT(src != NULL);569 assert(size > 0); 570 assert(src != NULL); 571 571 572 572 size_t src_off = 0; … … 601 601 { 602 602 /* There must be space for a null terminator in the buffer. */ 603 ASSERT(size > 0);603 assert(size > 0); 604 604 605 605 size_t src_off = 0; … … 635 635 size_t size = str_size(src) + 1; 636 636 char *dest = malloc(size, 0); 637 ASSERT(dest);637 assert(dest); 638 638 639 639 str_cpy(dest, size, src); … … 668 668 669 669 char *dest = malloc(size + 1, 0); 670 ASSERT(dest);670 assert(dest); 671 671 672 672 str_ncpy(dest, size + 1, src, size); … … 691 691 692 692 /* There must be space for a null terminator in the buffer. */ 693 ASSERT(size > 0);693 assert(size > 0); 694 694 695 695 src_idx = 0; … … 797 797 bool *neg, uint64_t *result) 798 798 { 799 ASSERT(endptr != NULL);800 ASSERT(neg != NULL);801 ASSERT(result != NULL);799 assert(endptr != NULL); 800 assert(neg != NULL); 801 assert(result != NULL); 802 802 803 803 *neg = false; … … 918 918 bool strict, uint64_t *result) 919 919 { 920 ASSERT(result != NULL);920 assert(result != NULL); 921 921 922 922 bool neg;
Note:
See TracChangeset
for help on using the changeset viewer.