jcs's openbsd hax
openbsd

localtime, strptime: time.h r1.33 removed the need to cast away const

ok jca millert

tb 8a5bd52c 4a796cf0

+5 -5
+2 -2
lib/libc/time/localtime.c
··· 1 - /* $OpenBSD: localtime.c,v 1.71 2025/08/17 08:42:21 phessler Exp $ */ 1 + /* $OpenBSD: localtime.c,v 1.72 2025/11/20 10:59:56 tb Exp $ */ 2 2 /* 3 3 ** This file is in the public domain, so clarified as of 4 4 ** 1996-06-05 by Arthur David Olson. ··· 1356 1356 tmp->tm_zone = wildabbr; 1357 1357 else { 1358 1358 if (gmtptr == NULL) 1359 - tmp->tm_zone = (char *)gmt; 1359 + tmp->tm_zone = gmt; 1360 1360 else 1361 1361 tmp->tm_zone = gmtptr->chars; 1362 1362 }
+3 -3
lib/libc/time/strptime.c
··· 1 - /* $OpenBSD: strptime.c,v 1.33 2025/08/26 22:30:42 millert Exp $ */ 1 + /* $OpenBSD: strptime.c,v 1.34 2025/11/20 10:59:56 tb Exp $ */ 2 2 /* $NetBSD: strptime.c,v 1.12 1998/01/20 21:39:40 mycroft Exp $ */ 3 3 /*- 4 4 * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. ··· 484 484 ep = _find_string(bp, &i, nast, NULL, 4); 485 485 if (ep != NULL) { 486 486 tm->tm_gmtoff = (-5 - i) * SECSPERHOUR; 487 - tm->tm_zone = (char *)nast[i]; 487 + tm->tm_zone = nast[i]; 488 488 bp = ep; 489 489 continue; 490 490 } ··· 492 492 if (ep != NULL) { 493 493 tm->tm_isdst = 1; 494 494 tm->tm_gmtoff = (-4 - i) * SECSPERHOUR; 495 - tm->tm_zone = (char *)nadt[i]; 495 + tm->tm_zone = nadt[i]; 496 496 bp = ep; 497 497 continue; 498 498 }