constify day, month and tz
authorop <op@openbsd.org>
Wed, 10 May 2023 08:02:10 +0000 (08:02 +0000)
committerop <op@openbsd.org>
Wed, 10 May 2023 08:02:10 +0000 (08:02 +0000)
spotted while diffing with -portable, where tz is marked as const.
ok tb@

usr.sbin/smtpd/to.c

index 6e340cc..4a5c692 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: to.c,v 1.48 2021/06/14 17:58:16 eric Exp $    */
+/*     $OpenBSD: to.c,v 1.49 2023/05/10 08:02:10 op Exp $      */
 
 /*
  * Copyright (c) 2009 Jacek Masiulaniec <jacekm@dobremiasto.net>
@@ -140,10 +140,10 @@ time_to_text(time_t when)
 {
        struct tm *lt;
        static char buf[40];
-       char *day[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
-       char *month[] = {"Jan","Feb","Mar","Apr","May","Jun",
+       const char *day[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
+       const char *month[] = {"Jan","Feb","Mar","Apr","May","Jun",
                         "Jul","Aug","Sep","Oct","Nov","Dec"};
-       char *tz;
+       const char *tz;
        long offset;
 
        lt = localtime(&when);