From: Ralph Corderoy Date: Sun, 23 Apr 2017 08:48:13 +0000 (+0100) Subject: sbr/dtime.c: Remove struct-assigning twscopy(). X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/64c1e9c1845f4a3531d5a64c1233fda03ae284ae?ds=inline 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. --- 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; }