mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-18 00:37:01 +00:00
getdata: new xstrstr function for performance
The strstr is changed to xstrstr, which short cuts to points in string where first differences are expected to found. This made the tool tiny bit quicker. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
8c6a3d9a4a
commit
b1cd84e804
3 changed files with 32 additions and 5 deletions
|
|
@ -162,6 +162,7 @@ void *safe_malloc(const size_t size)
|
|||
;
|
||||
void *safe_realloc(void *ptr, const size_t size);
|
||||
char *safe_strdup(const char *str) __attribute__ ((nonnull(1)));
|
||||
int xstrstr(char *a, char *b, int len);
|
||||
void print_version(void) __attribute__ ((noreturn));
|
||||
void usage(int status) __attribute__ ((noreturn));
|
||||
/* qsort required functions... */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue