Revert "Merge remote-tracking branch 'besser82/bugfix/json-c' into 0.15"

This reverts commit 1c4a086e75, reversing
changes made to 1263ea6497.
This commit is contained in:
Drew DeVault 2017-12-17 15:52:34 -05:00
parent 1c4a086e75
commit d0bd0ed598
9 changed files with 17 additions and 48 deletions

View file

@ -9,7 +9,7 @@
#include <sys/socket.h>
#include <ctype.h>
#include <unistd.h>
#include "sway_json_helper.h"
#include <json-c/json.h>
#include "stringop.h"
#include "ipc-client.h"
#include "readline.h"
@ -149,7 +149,7 @@ static void pretty_print_version(json_object *v) {
static void pretty_print_clipboard(json_object *v) {
if (success(v, true)) {
if (json_object_is_type(v, json_type_array)) {
for (json_ar_len_t i = 0; i < json_object_array_length(v); ++i) {
for (int i = 0; i < json_object_array_length(v); ++i) {
json_object *o = json_object_array_get_idx(v, i);
printf("%s\n", json_object_get_string(o));
}