File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ EventNode *readEventData(char *eventFile) {
198198 return newEvents ;
199199 }
200200
201- // Check if line was truncated
201+ // Check for line truncation
202202 size_t len = strlen (line );
203203 if (len == EVENT_LINE_SIZE - 1 && line [len - 1 ] != '\n' ) {
204204 logError ("Event line too long (exceeds %d chars), data may be truncated\n" ,
@@ -227,10 +227,11 @@ EventNode *readEventData(char *eventFile) {
227227
228228 while (fgets (line , EVENT_LINE_SIZE , in ) != NULL ) {
229229 // Check if line was truncated
230- size_t len = strlen (line );
230+ len = strlen (line );
231231 if (len == EVENT_LINE_SIZE - 1 && line [len - 1 ] != '\n' ) {
232- logError ("Event line too long (exceeds %d chars), data may be truncated\n" ,
233- EVENT_LINE_SIZE );
232+ logError (
233+ "Event line too long (exceeds %d chars), data may be truncated\n" ,
234+ EVENT_LINE_SIZE );
234235 exit (EXIT_CODE_INPUT_FILE_ERROR );
235236 }
236237 // We have another event
You can’t perform that action at this time.
0 commit comments