mirror of https://git.kore.io/kore.git
changed needle length type to size_t in kore_mem_find(). updated function prototype in kore.h. Use tab instead of space indentation
This commit is contained in:
parent
3ef8562bac
commit
43a5703456
|
@ -514,7 +514,7 @@ int kore_snprintf(char *, size_t, int *, const char *, ...);
|
|||
long long kore_strtonum(const char *, int, long long, long long, int *);
|
||||
int kore_base64_encode(u_int8_t *, u_int32_t, char **);
|
||||
int kore_base64_decode(char *, u_int8_t **, u_int32_t *);
|
||||
void *kore_mem_find(void *, size_t, void *, u_int32_t);
|
||||
void *kore_mem_find(void *, size_t, void *, size_t);
|
||||
char *kore_text_trim(char *, size_t);
|
||||
char *kore_read_line(FILE *, char *, size_t);
|
||||
|
||||
|
|
|
@ -482,11 +482,11 @@ kore_base64_decode(char *in, u_int8_t **out, u_int32_t *olen)
|
|||
}
|
||||
|
||||
void *
|
||||
kore_mem_find(void *src, size_t slen, void *needle, u_int32_t len)
|
||||
kore_mem_find(void *src, size_t slen, void *needle, size_t len)
|
||||
{
|
||||
size_t pos;
|
||||
size_t pos;
|
||||
|
||||
for(pos = 0; pos < slen; pos++) {
|
||||
for(pos = 0; pos < slen; pos++) {
|
||||
if ( *((u_int8_t *)src + pos) != *(u_int8_t *)needle)
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue