From 64c1e9c1845f4a3531d5a64c1233fda03ae284ae Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Sun, 23 Apr 2017 09:48:13 +0100 Subject: [PATCH] sbr/dtime.c: Remove struct-assigning twscopy(). Historically, twscopy() assigned all the struct's members individually, but that was `#if 0'd as far back as the repository goes. The one caller now uses assignment, making clear the direction of data flow. --- h/tws.h | 1 - sbr/dtime.c | 11 ----------- uip/picksbr.c | 2 +- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/h/tws.h b/h/tws.h index 9e0f9b64..051ee4c9 100644 --- a/h/tws.h +++ b/h/tws.h @@ -55,7 +55,6 @@ struct tws *dlocaltime (time_t *); struct tws *dgmtime (time_t *); char *dasctime (struct tws *, int); char *dtimezone (int, int); -void twscopy (struct tws *, struct tws *); int twsort (struct tws *, struct tws *); time_t dmktime (struct tws *); void set_dotw (struct tws *); diff --git a/sbr/dtime.c b/sbr/dtime.c index 52f3a790..14051b92 100644 --- a/sbr/dtime.c +++ b/sbr/dtime.c @@ -393,17 +393,6 @@ set_dotw (struct tws *tw) } -/* - * Copy nmh time structure - */ - -void -twscopy (struct tws *tb, struct tws *tw) -{ - *tb = *tw; /* struct copy */ -} - - /* * Compare two nmh time structures */ diff --git a/uip/picksbr.c b/uip/picksbr.c index ba25e247..c29e669b 100644 --- a/uip/picksbr.c +++ b/uip/picksbr.c @@ -841,7 +841,7 @@ tcompile (char *ap, struct tws *tb, int isafter) if ((tw = tws_parse (ap, isafter)) == NULL) return 0; - twscopy (tb, tw); + *tb = *tw; return 1; } -- 2.56.0