[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] branch master updated: minor style fix
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] branch master updated: minor style fix |
Date: |
Fri, 19 Jan 2018 00:14:09 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new f7baa35 minor style fix
f7baa35 is described below
commit f7baa358b5792bb0443c468171889c485dbf9371
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Jan 19 00:14:07 2018 +0100
minor style fix
---
src/backend/taler-merchant-httpd.c | 42 +++++++++++++++++++++++---------------
1 file changed, 25 insertions(+), 17 deletions(-)
diff --git a/src/backend/taler-merchant-httpd.c
b/src/backend/taler-merchant-httpd.c
index 572f5cf..f4a1136 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -523,6 +523,17 @@ static void
locations_iterator_cb (void *cls,
const char *section)
{
+ static const char *keys[] = {
+ "country",
+ "city",
+ "state",
+ "region",
+ "province",
+ "zip_code",
+ "street",
+ "street_number",
+ NULL,
+ };
struct GNUNET_CONFIGURATION_Handle *cfg = cls;
const char *prefix = "merchant-location-";
const char *substr = strstr (section, prefix);
@@ -531,32 +542,28 @@ locations_iterator_cb (void *cls,
if ( (NULL == substr) || (substr != section) )
return;
-
locname = section + strlen (prefix);
if (0 == strlen (locname))
return;
-
GNUNET_assert (json_is_object (default_locations));
loc = json_object ();
- json_object_set_new (default_locations, locname, loc);
-
- char *keys[] = {
- "country", "city", "state", "region", "province",
- "zip_code", "street", "street_number",
- NULL,
- };
-
+ json_object_set_new (default_locations,
+ locname,
+ loc);
for (unsigned int pos = 0; NULL != keys[pos]; pos++)
{
char *val;
- (void) GNUNET_CONFIGURATION_get_value_string (cfg,
- section,
- keys[pos],
- &val);
- if (NULL != val)
+
+ if (GNUNET_OK ==
+ GNUNET_CONFIGURATION_get_value_string (cfg,
+ section,
+ keys[pos],
+ &val))
{
- json_object_set_new (loc, keys[pos], json_string (val));
+ json_object_set_new (loc,
+ keys[pos],
+ json_string (val));
GNUNET_free (val);
}
}
@@ -587,7 +594,8 @@ instances_iterator_cb (void *cls,
char *emsg;
iic = cls;
- substr = strstr (section, "merchant-instance-");
+ substr = strstr (section,
+ "merchant-instance-");
if ( (NULL == substr) ||
(NULL != strstr (section,
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-merchant] branch master updated: minor style fix,
gnunet <=