mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-17 16:26:59 +00:00
getdata: skip strings before nth_field analysis
This will allow nth_field function to begin from first field, and stop immediately when it ends, which makes function much more simple and quite a bit quicker. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
b918e9157d
commit
4341d92d41
2 changed files with 12 additions and 30 deletions
|
|
@ -157,8 +157,8 @@ int prepare_memory(void);
|
|||
int parse_leases(void);
|
||||
void parse_config(int, const char *__restrict, struct shared_network_t *__restrict)
|
||||
__attribute__ ((nonnull(2, 3)));
|
||||
int nth_field(int n, char *__restrict dest, const char *__restrict src)
|
||||
__attribute__ ((nonnull(2, 3)))
|
||||
void nth_field(char *__restrict dest, const char *__restrict src)
|
||||
__attribute__ ((nonnull(1, 2)))
|
||||
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
||||
__attribute__ ((__hot__))
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue