misc: Replace assert include and calls by sys/__assert.h equivalent
Replace all calls to the assert macro that comes from libc by calls to __ASSERT_NO_MSG(). This is usefull as the former might be different depending on the libc used and the later can be customized to reduce flash footprint. Signed-off-by: Xavier Chapron <xavier.chapron@stimio.fr>
This commit is contained in:
parent
25e19f89f1
commit
824f423e54
35 changed files with 83 additions and 93 deletions
|
@ -21,7 +21,7 @@
|
|||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
#include <assert.h>
|
||||
#include <sys/__assert.h>
|
||||
#include <stddef.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -385,7 +385,7 @@ int http_parse_host(const char *buf, struct http_parser_url *u,
|
|||
const char *p;
|
||||
|
||||
buflen = u->field_data[UF_HOST].off + u->field_data[UF_HOST].len;
|
||||
assert(u->field_set & (1 << UF_HOST));
|
||||
__ASSERT_NO_MSG(u->field_set & (1 << UF_HOST));
|
||||
|
||||
u->field_data[UF_HOST].len = 0U;
|
||||
|
||||
|
@ -521,7 +521,7 @@ http_parser_parse_url(const char *buf, size_t buflen, int is_connect,
|
|||
break;
|
||||
|
||||
default:
|
||||
assert(!"Unexpected state");
|
||||
__ASSERT_NO_MSG(!"Unexpected state");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue