Skip to content

Commit 2c721ce

Browse files
authored
Merge pull request #33 from mysterywolf/master
remove memrchr
2 parents b2f2d65 + c041824 commit 2c721ce

1 file changed

Lines changed: 2 additions & 21 deletions

File tree

module/wn_module_upload.c

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#include <wn_module.h>
1313
#include <wn_utils.h>
1414

15+
#include <strings.h>
16+
1517
#ifdef RT_USING_DFS
1618
#include <dfs_posix.h>
1719
#endif
@@ -146,27 +148,6 @@ static char* memstrs(const char* str, size_t length, int num, ...)
146148
return ptr;
147149
}
148150

149-
#if !(defined(__GNUC__) && !defined(__ARMCC_VERSION)/*GCC*/)
150-
static void* memrchr(const void *s, int c, size_t n)
151-
{
152-
register const char* t=s;
153-
register const char* last=0;
154-
int i;
155-
156-
t = t + n;
157-
for (i=n; i; --i)
158-
{
159-
if (*t==c)
160-
{
161-
last=t;
162-
break;
163-
}
164-
t--;
165-
}
166-
return (void*)last; /* man, what an utterly b0rken prototype */
167-
}
168-
#endif
169-
170151
static char* _webnet_module_upload_parse_header(struct webnet_session* session, char* buffer, rt_size_t length)
171152
{
172153
char *ptr, *ch, *end_ptr;

0 commit comments

Comments
 (0)