gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated (e3cb893de -> 7ed029945)


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated (e3cb893de -> 7ed029945)
Date: Mon, 21 Jan 2019 02:10:13 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a change to branch master
in repository gnunet.

    from e3cb893de Merge branch 'license/spdx'
     new a0afe6fbc fix compiler warnings
     new 7ed029945 fix use of strptime

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/set/gnunet-service-set.c       |  1 -
 src/set/gnunet-service-set_union.c | 20 --------------------
 src/util/strings.c                 | 22 ++++++++++++----------
 3 files changed, 12 insertions(+), 31 deletions(-)

diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c
index 0d47504d2..c71eb6edc 100644
--- a/src/set/gnunet-service-set.c
+++ b/src/set/gnunet-service-set.c
@@ -206,7 +206,6 @@ static void
 incoming_destroy (struct Operation *op)
 {
   struct Listener *listener;
-  struct GNUNET_CADET_Channel *channel;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Destroying incoming operation %p\n",
diff --git a/src/set/gnunet-service-set_union.c 
b/src/set/gnunet-service-set_union.c
index 7d7ab27a5..8786807dc 100644
--- a/src/set/gnunet-service-set_union.c
+++ b/src/set/gnunet-service-set_union.c
@@ -1368,26 +1368,6 @@ send_client_element (struct Operation *op,
 }
 
 
-/**
- * Destroy remote channel.
- *
- * @param op operation
- */
-static void
-destroy_channel (struct Operation *op)
-{
-  struct GNUNET_CADET_Channel *channel;
-
-  if (NULL != (channel = op->channel))
-  {
-    /* This will free op; called conditionally as this helper function
-       is also called from within the channel disconnect handler. */
-    op->channel = NULL;
-    GNUNET_CADET_channel_destroy (channel);
-  }
-}
-
-
 /**
  * Signal to the client that the operation has finished and
  * destroy the operation.
diff --git a/src/util/strings.c b/src/util/strings.c
index 535c998cd..2cbdb640b 100644
--- a/src/util/strings.c
+++ b/src/util/strings.c
@@ -385,6 +385,7 @@ GNUNET_STRINGS_fancy_time_to_absolute (const char 
*fancy_time,
 {
   struct tm tv;
   time_t t;
+  const char *eos;
 
   if (0 == strcasecmp ("end of time",
                        fancy_time))
@@ -392,17 +393,18 @@ GNUNET_STRINGS_fancy_time_to_absolute (const char 
*fancy_time,
     *atime = GNUNET_TIME_UNIT_FOREVER_ABS;
     return GNUNET_OK;
   }
+  eos = &fancy_time[strlen (fancy_time)];
   memset (&tv, 0, sizeof (tv));
-  if ( (NULL == strptime (fancy_time, "%a %b %d %H:%M:%S %Y", &tv)) &&
-       (NULL == strptime (fancy_time, "%c", &tv)) &&
-       (NULL == strptime (fancy_time, "%Ec", &tv)) &&
-       (NULL == strptime (fancy_time, "%Y-%m-%d %H:%M:%S", &tv)) &&
-       (NULL == strptime (fancy_time, "%Y-%m-%d %H:%M", &tv)) &&
-       (NULL == strptime (fancy_time, "%x", &tv)) &&
-       (NULL == strptime (fancy_time, "%Ex", &tv)) &&
-       (NULL == strptime (fancy_time, "%Y-%m-%d", &tv)) &&
-       (NULL == strptime (fancy_time, "%Y-%m", &tv)) &&
-       (NULL == strptime (fancy_time, "%Y", &tv)) )
+  if ( (eos != strptime (fancy_time, "%a %b %d %H:%M:%S %Y", &tv)) &&
+       (eos != strptime (fancy_time, "%c", &tv)) &&
+       (eos != strptime (fancy_time, "%Ec", &tv)) &&
+       (eos != strptime (fancy_time, "%Y-%m-%d %H:%M:%S", &tv)) &&
+       (eos != strptime (fancy_time, "%Y-%m-%d %H:%M", &tv)) &&
+       (eos != strptime (fancy_time, "%x", &tv)) &&
+       (eos != strptime (fancy_time, "%Ex", &tv)) &&
+       (eos != strptime (fancy_time, "%Y-%m-%d", &tv)) &&
+       (eos != strptime (fancy_time, "%Y-%m", &tv)) &&
+       (eos != strptime (fancy_time, "%Y", &tv)) )
     return GNUNET_SYSERR;
   t = mktime (&tv);
   atime->abs_value_us = (uint64_t) ((uint64_t) t * 1000LL * 1000LL);

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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