nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nmh-workers] Removing Call to dlocaltimenow() in sortm(1).


From: Ralph Corderoy
Subject: [Nmh-workers] Removing Call to dlocaltimenow() in sortm(1).
Date: Sun, 23 Apr 2017 09:47:59 +0100

Hi,

I committed 62ee157e2dd14a1aec566d0370a1275654abd143.

    uip/sortm.c: Remove unused variable and dlocaltimenow() call.

    read_hdrs() has a auto `struct tws tb'.  It's only use is as the
    destination for dlocaltimenow()'s result.  Remove the variable.  Also
    remove the dlocaltimenow() call;  this I'm unsure about as it has a
    side effect of calling tzset(3).  However, tests pass.  Repository
    history sheds no light.

The diff is

     read_hdrs (struct msgs *mp, char *datesw)
     {
         int msgnum;
    -    struct tws tb;
         struct smsg *s;
     
    -    twscopy (&tb, dlocaltimenow ());
    -
         smsgs = mh_xcalloc(mp->hghsel - mp->lowsel + 2, sizeof *smsgs);
         s = smsgs;
         for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) {

I'm raising it here in case anyone has wounds from the code implicitly
expecting tzset(3) calls to happen in the past.

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy



reply via email to

[Prev in Thread] Current Thread [Next in Thread]