diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-26 18:13:27 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-26 18:13:27 +0100 |
| commit | 78c3cebc389a2b0d426d74900a65b8656edb426d (patch) | |
| tree | 122003fecc6b53c2dde6393896a852e3689900ff /ot_urlencoded.c | |
| parent | 6837c5ac80e3624c6dc3a82d03e50d68b2f5a989 (diff) | |
Third run of making variable and function names more readable, integer scans and ip parsers
Diffstat (limited to 'ot_urlencoded.c')
| -rw-r--r-- | ot_urlencoded.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/ot_urlencoded.c b/ot_urlencoded.c index 1ca6e81..17f12a4 100644 --- a/ot_urlencoded.c +++ b/ot_urlencoded.c | |||
| @@ -146,19 +146,6 @@ ssize_t urlencoded_parse(char **string, char *deststring, SCAN_SEARCHPATH_FLAG f | |||
| 146 | return d - (unsigned char *)deststring; | 146 | return d - (unsigned char *)deststring; |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | ssize_t scan_fixed_int(char *data, size_t len, int *tmp) { | ||
| 150 | int minus = 0; | ||
| 151 | *tmp = 0; | ||
| 152 | if (*data == '-') | ||
| 153 | --len, ++data, ++minus; | ||
| 154 | while ((len > 0) && (*data >= '0') && (*data <= '9')) { | ||
| 155 | --len; | ||
| 156 | *tmp = 10 * *tmp + *data++ - '0'; | ||
| 157 | } | ||
| 158 | if (minus) | ||
| 159 | *tmp = -*tmp; | ||
| 160 | return len; | ||
| 161 | } | ||
| 162 | 149 | ||
| 163 | size_t urlencoded_format(char *dest, const uint8_t *src, size_t len) { | 150 | size_t urlencoded_format(char *dest, const uint8_t *src, size_t len) { |
| 164 | static const char safe[] = "$/.=~-_"; | 151 | static const char safe[] = "$/.=~-_"; |
