From 46d79274a5051fbb19ebcb97c414de7ca1a595d2 Mon Sep 17 00:00:00 2001 From: Douglas Clowes Date: Mon, 14 Apr 2008 08:40:07 +1000 Subject: [PATCH] fix missing pointer dereferences, change SerialError to getRS232Error r2417 | dcl | 2008-04-14 08:40:07 +1000 (Mon, 14 Apr 2008) | 2 lines --- site_ansto/hardsup/lh45util.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/site_ansto/hardsup/lh45util.c b/site_ansto/hardsup/lh45util.c index 00940fc6..240276f0 100644 --- a/site_ansto/hardsup/lh45util.c +++ b/site_ansto/hardsup/lh45util.c @@ -47,7 +47,6 @@ #include #include #include "lh45util.h" -#include #include /* -------------------------------------------------------------------------*/ @@ -308,7 +307,7 @@ char *ReplyStart(char *pReply) //sprintf(self->pAns,"The read value is '%s'\n and the command is: '%s' \n",pReply,pCommand); //return LH45__FAULT; - if(pReplyStart == '-'&&strlen(pReplyStart)>7) // Not a number (-XXX.X\r), probably an error response + if(*pReplyStart == '-' && strlen(pReplyStart)>7) // Not a number (-XXX.X\r), probably an error response { strcpy(self->pAns,pReplyStart); return LH45__BADCOM; @@ -367,7 +366,7 @@ char *ReplyStart(char *pReply) { return iRet; } - if(pReplyStart == '-'&&strlen(pReplyStart)>7) // Not a number (-XXX.X\r), probably an error response + if(*pReplyStart == '-'&&strlen(pReplyStart)>7) // Not a number (-XXX.X\r), probably an error response { strcpy(self->pAns,pReplyStart); return LH45__BADCOM; @@ -431,7 +430,7 @@ char *ReplyStart(char *pReply) strncpy(pError,pBueffel,iLen); break; default: - SerialError(iCode, pError,iLen); + getRS232Error(iCode, pError,iLen); break; } }