Skip to content

a suggestion:2-strlen.c  #1

@kelaicai

Description

@kelaicai

`size_t _strlen(const char *str)
{
size_t length = 0;

while (*str++)
	length++;

return (length);

}`

u should consider input arg ‘str’ is NULL ptr 。because if u operator NULL as *,u program will core dump in runnig

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions