diff options
author | Pavel Kotucek <pkotucek@cisco.com> | 2016-02-24 15:52:42 +0100 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2016-02-26 20:48:04 +0000 |
commit | 060c6fc0b54c909db56856b4d3e3fa65265f5871 (patch) | |
tree | ba41bc18a8fe3afe3adbbe1216db3ebf64ae5bff | |
parent | 8b4d82cd4fe0215d6c481829328b19f6d740dae4 (diff) |
Fixed issue with json output in vpp_api_test.
When it runs 'exec' command string "(nil)" is appended to the end of the
console output.
Change-Id: I7cdae78b2166829dd2160e92ed8181203eb491ed
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
-rw-r--r-- | vpp-api-test/vat/api_format.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vpp-api-test/vat/api_format.c b/vpp-api-test/vat/api_format.c index 0c0a65e0dd3..b6f09021d5b 100644 --- a/vpp-api-test/vat/api_format.c +++ b/vpp-api-test/vat/api_format.c @@ -2428,7 +2428,8 @@ int exec (vat_main_t * vam) while (vat_time_now (vam) < timeout) { if (vam->result_ready == 1) { u8 * free_me; - fformat (vam->ofp, "%s", vam->shmem_result); + if (vam->shmem_result != NULL) + fformat (vam->ofp, "%s", vam->shmem_result); pthread_mutex_lock (&am->vlib_rp->mutex); oldheap = svm_push_data_heap (am->vlib_rp); |