<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
  img {
    max-width: 100%;
    height: auto;
  }
  p.details {
    font-style:italic;
    color:#777
  }
  .footer p {
    font-size:small;
    color:#777
  }
  pre.commit-message {
    white-space: pre-wrap;
  }
  .file-stats a {
    text-decoration: none;
  }
  .file-stats .new-file {
    color: #090;
  }
  .file-stats .deleted-file {
    color: #B00;
  }
</style>
<body>
<div class='content'>
<h3>
Hal Murray pushed to branch master
at <a href="https://gitlab.com/NTPsec/ntpsec">NTPsec / ntpsec</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.com/NTPsec/ntpsec/commit/e6c6ac9b00bf209b0b7b1e70b2d32405315712ac">e6c6ac9b</a></strong>
<div>
<span>by Hal Murray</span>
<i>at 2016-01-19T21:35:40-08:00</i>
</div>
<pre class='commit-message'>Fix Coverty complaint about returning pointer to stack.

Drop ntp2unix_tm - not used.</pre>
</li>
</ul>
<h4>2 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
include/ntp_fp.h
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
libntp/prettydate.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/e6c6ac9b00bf209b0b7b1e70b2d32405315712ac#diff-0'>
<strong>
include/ntp_fp.h
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/include/ntp_fp.h
</span><span style="color: #000000;background-color: #ddffdd">+++ b/include/ntp_fp.h
</span><span style="color: #aaaaaa">@@ -358,8 +358,6 @@ extern    void    get_systime     (l_fp *);
</span> extern    bool    step_systime    (double, int (*settime)(struct timespec *));
 extern bool    adj_systime     (double, int (*adjtime)(const struct timeval *, struct timeval *));
 
<span style="color: #000000;background-color: #ffdddd">-extern  struct tm * ntp2unix_tm (uint32_t ntp, int local);
-
</span> #define   lfptoa(fpv, ndec)       mfptoa((fpv)->l_ui, (fpv)->l_uf, (ndec))
 #define        lfptoms(fpv, ndec)      mfptoms((fpv)->l_ui, (fpv)->l_uf, (ndec))
 
</code></pre>

<br>
</li>
<li id='diff-1'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/e6c6ac9b00bf209b0b7b1e70b2d32405315712ac#diff-1'>
<strong>
libntp/prettydate.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/libntp/prettydate.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/libntp/prettydate.c
</span><span style="color: #aaaaaa">@@ -53,10 +53,11 @@ static char *common_prettydate(l_fp *, bool);
</span> 
 static struct tm *
 get_struct_tm(
<span style="color: #000000;background-color: #ffdddd">-        const vint64 *stamp,
-       int           local)
</span><span style="color: #000000;background-color: #ddffdd">+   const   vint64 *stamp,
+       int     local,
+       struct  tm *tmbuf)
</span> {
<span style="color: #000000;background-color: #ffdddd">-        struct tm  tmbuf, *tm = NULL;
</span><span style="color: #000000;background-color: #ddffdd">+   struct tm *tm;
</span>   int32_t    folds = 0;
        time_t     ts;
 
<span style="color: #aaaaaa">@@ -93,7 +94,7 @@ get_struct_tm(
</span>    * versions of 'gmtime_r()' and 'localtime_r()' will bark on time
         * stamps < 0.
         */
<span style="color: #000000;background-color: #ffdddd">-        while ((tm = (*(local ? localtime_r : gmtime_r))(&ts, &tmbuf)) == NULL)
</span><span style="color: #000000;background-color: #ddffdd">+   while ((tm = (*(local ? localtime_r : gmtime_r))(&ts, tmbuf)) == NULL)
</span>           if (ts < 0) {
                        if (--folds < MINFOLD)
                                return NULL;
<span style="color: #aaaaaa">@@ -126,7 +127,7 @@ common_prettydate(
</span>       "%08lx.%08lx %04d-%02d-%02dT%02d:%02d:%02d.%03u";
 
        char        *bp;
<span style="color: #000000;background-color: #ffdddd">-        struct tm   *tm;
</span><span style="color: #000000;background-color: #ddffdd">+   struct tm   *tm, tmbuf;
</span>   u_int        msec;
        uint32_t             ntps;
        vint64       sec;
<span style="color: #aaaaaa">@@ -141,7 +142,7 @@ common_prettydate(
</span>           ntps++;
        }
        sec = ntpcal_ntp_to_time(ntps, NULL);
<span style="color: #000000;background-color: #ffdddd">-        tm  = get_struct_tm(&sec, local);
</span><span style="color: #000000;background-color: #ddffdd">+   tm  = get_struct_tm(&sec, local, &tmbuf);
</span>   if (!tm) {
                /*
                 * get a replacement, but always in UTC, using
<span style="color: #aaaaaa">@@ -192,14 +193,3 @@ gmprettydate(
</span>   return common_prettydate(ts, false);
 }
 
<span style="color: #000000;background-color: #ffdddd">-
-struct tm *
-ntp2unix_tm(
-       uint32_t ntp, int local
-       )
-{
-       vint64 vl;
-       vl = ntpcal_ntp_to_time(ntp, NULL);
-       return get_struct_tm(&vl, local);
-}
-       
</span></code></pre>

<br>
</li>

</div>
<div class='footer' style='margin-top: 10px;'>
<p>

<br>
<a href="https://gitlab.com/NTPsec/ntpsec/commit/e6c6ac9b00bf209b0b7b1e70b2d32405315712ac">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://gitlab.com/NTPsec/ntpsec/commit/e6c6ac9b00bf209b0b7b1e70b2d32405315712ac"}}</script>
</p>
</div>
</body>
</html>