Skip to content

Commit 29b2a8f

Browse files
committed
Refactor: Patch fixes
1 parent 4fa688c commit 29b2a8f

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

gpcontrib/gp_url_tools/src/gp_url_tools.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ PG_FUNCTION_INFO_V1(decode_url);
3838
PG_FUNCTION_INFO_V1(encode_uri);
3939
PG_FUNCTION_INFO_V1(decode_uri);
4040

41-
Datum url_encode(PG_FUNCTION_ARGS);
42-
Datum url_decode(PG_FUNCTION_ARGS);
43-
Datum uri_encode(PG_FUNCTION_ARGS);
44-
Datum uri_decode(PG_FUNCTION_ARGS);
45-
4641
static bool allowed_character(const char c, const char *unreserved_special);
4742
static unsigned char char2hex(char c);
4843
static char *write_character(char *output, const char c);
@@ -70,7 +65,7 @@ unsigned char char2hex(char c) {
7065
}
7166
ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
7267
errmsg("invalid hexadecimal digit: \"%c\"", c)));
73-
return -1;
68+
pg_unreachable();
7469
}
7570

7671
bool allowed_character(const char c, const char *unreserved_special) {
@@ -147,7 +142,7 @@ bool is_utf8(const char *sequence, int length) {
147142
// Check that sequence of bytes starts with 'symbol' in UTF-16 encoding
148143
//
149144
// UTF-16 'symbols' starts with '%u' or '%U', and 'XXXX' after it.
150-
// 'XXXX' - hex sequence that encode bytes (optinally sequence 'XXXX' ->
145+
// 'XXXX' - hex sequence that encode bytes (optionally sequence 'XXXX' ->
151146
// 'XXXXXXXX')
152147
bool is_utf16(const char *sequence, int length) {
153148
return 6 <= length && sequence[0] == '%' &&

0 commit comments

Comments
 (0)