summaryrefslogtreecommitdiff
path: root/source4/lib/replace
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/replace')
-rw-r--r--source4/lib/replace/inet_ntop.c2
-rw-r--r--source4/lib/replace/inet_pton.c4
-rw-r--r--source4/lib/replace/timegm.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/source4/lib/replace/inet_ntop.c b/source4/lib/replace/inet_ntop.c
index 1b84cda6f0..fb3d8e90c8 100644
--- a/source4/lib/replace/inet_ntop.c
+++ b/source4/lib/replace/inet_ntop.c
@@ -74,7 +74,7 @@ rep_inet_ntop(int af, const void *src, char *dst, socklen_t size)
static const char *
inet_ntop4(const unsigned char *src, char *dst, socklen_t size)
{
- const char *fmt = "%u.%u.%u.%u";
+ static const char *fmt = "%u.%u.%u.%u";
char tmp[sizeof "255.255.255.255"];
size_t len;
diff --git a/source4/lib/replace/inet_pton.c b/source4/lib/replace/inet_pton.c
index ea0fe6b78c..80e4865ef4 100644
--- a/source4/lib/replace/inet_pton.c
+++ b/source4/lib/replace/inet_pton.c
@@ -77,7 +77,7 @@ inet_pton4(src, dst)
const char *src;
unsigned char *dst;
{
- const char digits[] = "0123456789";
+ static const char digits[] = "0123456789";
int saw_digit, octets, ch;
unsigned char tmp[NS_INADDRSZ], *tp;
@@ -131,7 +131,7 @@ inet_pton6(src, dst)
const char *src;
unsigned char *dst;
{
- const char xdigits_l[] = "0123456789abcdef",
+ static const char xdigits_l[] = "0123456789abcdef",
xdigits_u[] = "0123456789ABCDEF";
unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
const char *xdigits, *curtok;
diff --git a/source4/lib/replace/timegm.c b/source4/lib/replace/timegm.c
index 86f360bd3c..395c684e11 100644
--- a/source4/lib/replace/timegm.c
+++ b/source4/lib/replace/timegm.c
@@ -46,7 +46,7 @@ static int is_leap(unsigned y)
time_t rep_timegm(struct tm *tm)
{
- const unsigned ndays[2][12] ={
+ static const unsigned ndays[2][12] ={
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}};
time_t res = 0;