]> granicus.if.org Git - postgresql/commitdiff
Remove dead code.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 3 Feb 2015 07:43:44 +0000 (09:43 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 3 Feb 2015 07:43:44 +0000 (09:43 +0200)
Commit 13629df changed metaphone() function to return an empty string on
empty input, but it left the old error message in place. It's now dead code.

Michael Paquier, per Coverity warning.

contrib/fuzzystrmatch/fuzzystrmatch.c

index b48edb05ba69b9f0c5709b6aec703fc00231b4ad..f9508a574fd46489e2d4ff1cfa2ca622d1f3371d 100644 (file)
@@ -280,11 +280,6 @@ metaphone(PG_FUNCTION_ARGS)
                                 errmsg("argument exceeds the maximum length of %d bytes",
                                                MAX_METAPHONE_STRLEN)));
 
-       if (!(str_i_len > 0))
-               ereport(ERROR,
-                               (errcode(ERRCODE_ZERO_LENGTH_CHARACTER_STRING),
-                                errmsg("argument is empty string")));
-
        reqlen = PG_GETARG_INT32(1);
        if (reqlen > MAX_METAPHONE_STRLEN)
                ereport(ERROR,