aboutsummaryrefslogtreecommitdiff
path: root/src/port/snprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/port/snprintf.c')
-rw-r--r--src/port/snprintf.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/port/snprintf.c b/src/port/snprintf.c
index 231e5d6bdb4..531d2c5ee35 100644
--- a/src/port/snprintf.c
+++ b/src/port/snprintf.c
@@ -43,6 +43,8 @@
#endif
#include <sys/param.h>
+#include "common/string.h"
+
#ifndef NL_ARGMAX
#define NL_ARGMAX 16
#endif
@@ -790,16 +792,6 @@ bad_format:
target->failed = true;
}
-static size_t
-pg_strnlen(const char *str, size_t maxlen)
-{
- const char *p = str;
-
- while (maxlen-- > 0 && *p)
- p++;
- return p - str;
-}
-
static void
fmtstr(char *value, int leftjust, int minlen, int maxwidth,
int pointflag, PrintfTarget *target)