aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-11-21 13:00:54 +0200
committerSergey Poznyakoff <gray@gnu.org>2016-11-21 13:00:54 +0200
commit4e9e225408eeaa1f161ae366f68715529bea2d2a (patch)
tree9b85b13b3578c724b67a820df551aa785e1d41b7
parentc2f02c56a38a3e6d50b8ca2081db9d2de658b8ed (diff)
downloadgrecs-4e9e225408eeaa1f161ae366f68715529bea2d2a.tar.gz
grecs-4e9e225408eeaa1f161ae366f68715529bea2d2a.tar.bz2
Bugfixes
* src/jsonfmt.c (json_format_obj): Use grecs_symtab_count and grecs_symtab_foreach. * src/wordsplit.c: Always pass format strings as first argument to wsp->ws_error.
-rw-r--r--src/jsonfmt.c4
-rw-r--r--src/wordsplit.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/jsonfmt.c b/src/jsonfmt.c
index 9ccac37..9d900ca 100644
--- a/src/jsonfmt.c
+++ b/src/jsonfmt.c
@@ -124,10 +124,10 @@ json_format_obj(struct json_format *fmt, struct json_value *obj, size_t level)
size_t count, i;
struct json_pair **keypairs, **kp;
- count = grecs_symtab_count_entries(obj->v.o);
+ count = grecs_symtab_count(obj->v.o);
keypairs = grecs_calloc(count, sizeof(*keypairs));
kp = keypairs;
- grecs_symtab_enumerate(obj->v.o, collect_keypairs, &kp);
+ grecs_symtab_foreach(obj->v.o, collect_keypairs, &kp);
qsort(keypairs, count, sizeof(*keypairs), keypair_cmp_name);
json_writec(fmt, '{');
diff --git a/src/wordsplit.c b/src/wordsplit.c
index e326c8c..9381ae7 100644
--- a/src/wordsplit.c
+++ b/src/wordsplit.c
@@ -59,7 +59,7 @@
static void
_wsplt_alloc_die (struct wordsplit *wsp)
{
- wsp->ws_error (_("memory exhausted"));
+ wsp->ws_error ("%s", _("memory exhausted"));
abort ();
}
@@ -2330,7 +2330,7 @@ wordsplit_perror (struct wordsplit *wsp)
break;
default:
- wsp->ws_error (wordsplit_strerror (wsp));
+ wsp->ws_error ("%s", wordsplit_strerror (wsp));
}
}

Return to:

Send suggestions and report system problems to the System administrator.