diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2019-01-02 10:45:36 +0100 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2019-01-02 11:07:05 +0100 |
commit | 918094fde55fa0dbfd59a5f88d576efb513a88db (patch) | |
tree | 61e31656c60a6cc928c50cd633568043673e2cbd /src/stroke | |
parent | 69bc96f6b0b388d35e983f8d27224fa49d92918c (diff) | |
download | vyos-strongswan-918094fde55fa0dbfd59a5f88d576efb513a88db.tar.gz vyos-strongswan-918094fde55fa0dbfd59a5f88d576efb513a88db.zip |
New upstream version 5.7.2
Diffstat (limited to 'src/stroke')
-rw-r--r-- | src/stroke/stroke_keywords.c | 26 | ||||
-rw-r--r-- | src/stroke/stroke_keywords.h | 2 |
2 files changed, 9 insertions, 19 deletions
diff --git a/src/stroke/stroke_keywords.c b/src/stroke/stroke_keywords.c index 17a3663fe..33d735164 100644 --- a/src/stroke/stroke_keywords.c +++ b/src/stroke/stroke_keywords.c @@ -1,4 +1,4 @@ -/* C code produced by gperf version 3.0.4 */ +/* ANSI-C code produced by gperf version 3.1 */ /* Command-line: /usr/bin/gperf -m 10 -D -C -G -t */ /* Computed positions: -k'1,5,7' */ @@ -26,7 +26,7 @@ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) /* The character set is not based on ISO-646. */ -error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." +#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>." #endif @@ -69,9 +69,7 @@ inline #endif #endif static unsigned int -hash (str, len) - register const char *str; - register unsigned int len; +hash (register const char *str, register size_t len) { static const unsigned char asso_values[] = { @@ -102,7 +100,7 @@ hash (str, len) 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60 }; - register int hval = len; + register unsigned int hval = len; switch (hval) { @@ -175,7 +173,7 @@ static const struct stroke_token wordlist[] = {"resetcounters", STROKE_COUNTERS_RESET} }; -static const short lookup[] = +static const signed char lookup[] = { -1, -1, -1, 0, 1, 2, -1, 3, -1, 4, -1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, @@ -184,22 +182,14 @@ static const short lookup[] = -1, 46, -1, 47 }; -#ifdef __GNUC__ -__inline -#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ -__attribute__ ((__gnu_inline__)) -#endif -#endif const struct stroke_token * -in_word_set (str, len) - register const char *str; - register unsigned int len; +in_word_set (register const char *str, register size_t len) { if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) { - register int key = hash (str, len); + register unsigned int key = hash (str, len); - if (key <= MAX_HASH_VALUE && key >= 0) + if (key <= MAX_HASH_VALUE) { register int index = lookup[key]; diff --git a/src/stroke/stroke_keywords.h b/src/stroke/stroke_keywords.h index 4e0b66b3d..fa86ccb47 100644 --- a/src/stroke/stroke_keywords.h +++ b/src/stroke/stroke_keywords.h @@ -74,6 +74,6 @@ typedef enum { typedef struct stroke_token stroke_token_t; extern const stroke_token_t* in_word_set(register const char *str, - register unsigned len); + register size_t len); #endif /* _STROKE_KEYWORDS_H_ */ |