Skip to content

Commit

Permalink
LibC: mark strdup & strndup as __attribute__((malloc))
Browse files Browse the repository at this point in the history
  • Loading branch information
tryfinally authored and awesomekling committed Aug 13, 2020
1 parent 6e1d6d1 commit 1385959
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Libraries/LibC/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ const void* memmem(const void* haystack, size_t, const void* needle, size_t);
void bzero(void*, size_t);
void bcopy(const void*, void*, size_t);
void* memset(void*, int, size_t);
char* strdup(const char*);
char* strndup(const char*, size_t);
__attribute__((malloc)) char* strdup(const char*);
__attribute__((malloc)) char* strndup(const char*, size_t);
char* strcpy(char* dest, const char* src);
char* strncpy(char* dest, const char* src, size_t);
char* strchr(const char*, int c);
Expand Down

0 comments on commit 1385959

Please sign in to comment.