Remove superfluous trailing white space from C files
This commit is contained in:
@@ -63,7 +63,7 @@ BYTE getHexCode(BYTE startPos, char *str){
|
||||
}
|
||||
|
||||
|
||||
/** @brief Send the Hexdecimal string with CRC
|
||||
/** @brief Send the Hexdecimal string with CRC
|
||||
*/
|
||||
int LFGenWriteStart(Ascon *a) {
|
||||
|
||||
@@ -78,7 +78,7 @@ int LFGenWriteStart(Ascon *a) {
|
||||
HEAD = getHexCode(0, curText);
|
||||
LEN = getHexCode(2, curText);
|
||||
|
||||
// buffer size,
|
||||
// buffer size,
|
||||
pNewBuffer = (char *)malloc((LEN+2)*sizeof(char));
|
||||
bufInd=0;
|
||||
pNewBuffer[bufInd] = HEAD;
|
||||
@@ -130,9 +130,9 @@ int LFConcatChar(pDynString self, char chr){
|
||||
char *lfChr[2];
|
||||
|
||||
BYTE lfByte = (BYTE)chr;
|
||||
sprintf(lfChr, "%02x", lfByte);
|
||||
sprintf(lfChr, "%02x", lfByte);
|
||||
DynStringConcat(self, lfChr);
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -158,28 +158,28 @@ int LFGenReading(Ascon *a)
|
||||
if (HEAD==0x96) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (a->timeout > 0) {
|
||||
if (DoubleTime() - a->start > 0.05) {
|
||||
AsconError(a, "read timeout", 0);
|
||||
/* a->state = AsconTimeout; */
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
ret = AsconReadChar(a->fd, &chr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// read LEN info
|
||||
ret = AsconReadChar(a->fd, &chr);
|
||||
if(ret<0) {
|
||||
AsconError(a, "AsconReadChar failed in LEN reading in LFGenReading:", 0);
|
||||
AsconError(a, "AsconReadChar failed in LEN reading in LFGenReading:", 0);
|
||||
//a->state = AsconReadDone;
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
LEN = (BYTE)chr;
|
||||
if(LEN<2) {
|
||||
if(LEN<2) {
|
||||
AsconError(a, "Reading Error from the LF AG1010 device, wrong LEN info", 0);
|
||||
a->state = AsconReadDone;
|
||||
return 0;
|
||||
@@ -189,7 +189,7 @@ int LFGenReading(Ascon *a)
|
||||
int ind=0;
|
||||
lfchar[ind] = HEAD; ind++;
|
||||
lfchar[ind] = LEN; ind++;
|
||||
|
||||
|
||||
// read all other chars
|
||||
while(ind<LEN+2) {
|
||||
ret = AsconReadChar(a->fd, &chr);
|
||||
|
||||
Reference in New Issue
Block a user