Add missing extern keyword for a couple of numutils functions
authorDavid Rowley <drowley@postgresql.org>
Fri, 12 Jun 2020 23:27:25 +0000 (11:27 +1200)
committerDavid Rowley <drowley@postgresql.org>
Fri, 12 Jun 2020 23:27:25 +0000 (11:27 +1200)
In passing, also remove a few surplus empty lines from pg_ltoa and
pg_ulltoa_n in numutils.c

Reported-by: Andrew Gierth
Discussion: https://postgr.es/m/87y2ou3xuh.fsf@news-spur.riddles.org.uk
Backpatch-through: 13, where these changes were introduced

src/backend/utils/adt/numutils.c
src/include/utils/builtins.h

index 13877fdc1d1f2929b8f018e6dd727f0034dd1cde..a9d3fbf758f8e1a15428baeedd24f3a59ca848e1 100644 (file)
@@ -413,7 +413,6 @@ pg_ultoa_n(uint32 value, char *a)
 void
 pg_ltoa(int32 value, char *a)
 {
-
    uint32      uvalue = (uint32) value;
    int         len;
 
@@ -437,7 +436,6 @@ pg_ulltoa_n(uint64 value, char *a)
                i = 0;
    uint32      value2;
 
-
    /* Degenerate case */
    if (value == 0)
    {
index a352a8b773c4f3e46a02d50d8a838d8467756d36..a5c8772e95fa2e237378d0b3f0fbd6fc8c8a227a 100644 (file)
@@ -48,8 +48,8 @@ extern int32 pg_atoi(const char *s, int size, int c);
 extern int16 pg_strtoint16(const char *s);
 extern int32 pg_strtoint32(const char *s);
 extern void pg_itoa(int16 i, char *a);
-int            pg_ultoa_n(uint32 l, char *a);
-int            pg_ulltoa_n(uint64 l, char *a);
+extern int pg_ultoa_n(uint32 l, char *a);
+extern int pg_ulltoa_n(uint64 l, char *a);
 extern void pg_ltoa(int32 l, char *a);
 extern void pg_lltoa(int64 ll, char *a);
 extern char *pg_ultostr_zeropad(char *str, uint32 value, int32 minwidth);