gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: -fix -l option


From: gnunet
Subject: [taler-exchange] branch master updated: -fix -l option
Date: Sat, 12 Aug 2023 09:26:54 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new a72ba44a -fix -l option
a72ba44a is described below

commit a72ba44a33bd863a4e92f4253dc7602014c1d5f8
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Sat Aug 12 09:26:42 2023 +0200

    -fix -l option
---
 contrib/taler-terms-generator.in |  2 +-
 src/json/json_helper.c           | 12 ++++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/contrib/taler-terms-generator.in b/contrib/taler-terms-generator.in
index d328c770..b1e249e8 100755
--- a/contrib/taler-terms-generator.in
+++ b/contrib/taler-terms-generator.in
@@ -167,7 +167,7 @@ fi
 
 if [ -n "${ADD_LANGUAGE+x}" ]
 then
-    if echo "${ADD_LANGUAGE}" | grep -e '..' > /dev/null
+    if ! echo "${ADD_LANGUAGE}" | grep -e '^..$' > /dev/null
     then
         echo "Error: Invalid language '${ADD_LANGUAGE}'. Two characters (en, 
de, fr, ...) expected." 1>&2
         exit 1
diff --git a/src/json/json_helper.c b/src/json/json_helper.c
index 95c1be5f..2a161eaf 100644
--- a/src/json/json_helper.c
+++ b/src/json/json_helper.c
@@ -1261,8 +1261,11 @@ i18n_cleaner (void *cls,
   struct I18nContext *ctx = cls;
 
   (void) spec;
-  GNUNET_free (ctx->lp);
-  GNUNET_free (ctx);
+  if (NULL != ctx)
+  {
+    GNUNET_free (ctx->lp);
+    GNUNET_free (ctx);
+  }
 }
 
 
@@ -1282,8 +1285,9 @@ TALER_JSON_spec_i18n_string (const char *name,
     .size_ptr = NULL
   };
 
-  ctx->lp = (NULL != language_pattern) ? GNUNET_strdup (language_pattern) :
-            NULL;
+  ctx->lp = (NULL != language_pattern)
+    ? GNUNET_strdup (language_pattern)
+    : NULL;
   ctx->field = name;
   *strptr = NULL;
   return ret;

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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