From 6acc53b725ddd75772ea5f0777b2dcabf1583b50 Mon Sep 17 00:00:00 2001
From: Iztok Jeras <iztok.jeras@redpitaya.com>
Date: 摹曛, 08 10月 2015 03:00:34 +0800
Subject: [PATCH] integer parser: make buffer sizes more explicit, as sum of bitlength and NULL termination

---
 examples/test-tcp-srq/main.c |   15 ++-------------
 1 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/examples/test-tcp-srq/main.c b/examples/test-tcp-srq/main.c
index 227628b..6c97dfc 100644
--- a/examples/test-tcp-srq/main.c
+++ b/examples/test-tcp-srq/main.c
@@ -44,6 +44,7 @@
 #include <sys/ioctl.h>
 #include <errno.h>
 #include <arpa/inet.h>
+#include <unistd.h>
 
 #include "scpi/scpi.h"
 #include "../common/scpi-def.h"
@@ -84,7 +85,7 @@
 int SCPI_Error(scpi_t * context, int_fast16_t err) {
     (void) context;
     // BEEP
-    fprintf(stderr, "**ERROR: %d, \"%s\"\r\n", (int32_t) err, SCPI_ErrorTranslate(err));
+    fprintf(stderr, "**ERROR: %d, \"%s\"\r\n", (int16_t) err, SCPI_ErrorTranslate(err));
     return 0;
 }
 
@@ -106,18 +107,6 @@
         }
     }    
     return SCPI_RES_OK;
-}
-
-/**
- * Callback for *TST? command
- * 
- * It returns directly the result of the test
- * @param context
- * @return 0 means "test was OK", other values means, that some error bits are set
- */
-int32_t SCPI_Test(scpi_t * context) {
-    fprintf(stderr, "**Test\r\n");
-    return 0;
 }
 
 scpi_result_t SCPI_Reset(scpi_t * context) {

--
Gitblit v1.9.1