mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 15:57:00 +00:00
xstrstr: add function attributes
The pointers arguments are never null, and the function should be optimized as much as possible. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
34f99d2f08
commit
0a0fea05ad
1 changed files with 6 additions and 1 deletions
|
|
@ -126,7 +126,12 @@ int do_counting(void);
|
||||||
void flip_ranges(struct range_t *__restrict ranges, struct range_t *__restrict tmp_ranges)
|
void flip_ranges(struct range_t *__restrict ranges, struct range_t *__restrict tmp_ranges)
|
||||||
__attribute__ ((nonnull(1, 2)));
|
__attribute__ ((nonnull(1, 2)));
|
||||||
/* support functions */
|
/* support functions */
|
||||||
int xstrstr(const char *__restrict a, const char *__restrict b, int len);
|
int xstrstr(const char *__restrict a, const char *__restrict b, int len)
|
||||||
|
__attribute__ ((nonnull(1, 2)))
|
||||||
|
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
||||||
|
__attribute__ ((__hot__))
|
||||||
|
#endif
|
||||||
|
;
|
||||||
double strtod_or_err(const char *__restrict str, const char *__restrict errmesg);
|
double strtod_or_err(const char *__restrict str, const char *__restrict errmesg);
|
||||||
void print_version(void) __attribute__ ((noreturn));
|
void print_version(void) __attribute__ ((noreturn));
|
||||||
void usage(int status) __attribute__ ((noreturn));
|
void usage(int status) __attribute__ ((noreturn));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue