// find out what line format to use
if (log_entry_status==RLRC_Unknown) {
- x=0;
- while (x<(int)(sizeof(LogFormats)/sizeof(*LogFormats))) {
- if (LogFormats[x]!=current_format)
- {
- memset(&log_entry,0,sizeof(log_entry));
- log_entry_status=LogFormats[x]->ReadEntry(linebuf,&log_entry);
- if (log_entry_status!=RLRC_Unknown) break;
- }
- x++;
+ for (x=0 ; x<(int)(sizeof(LogFormats)/sizeof(*LogFormats)) ; x++) {
+ if (LogFormats[x]==current_format) continue;
+ memset(&log_entry,0,sizeof(log_entry));
+ log_entry_status=LogFormats[x]->ReadEntry(linebuf,&log_entry);
+ if (log_entry_status!=RLRC_Unknown) break;
}
- if (x<0 || x>=(int)(sizeof(LogFormats)/sizeof(*LogFormats))) {
+ if (x>=(int)(sizeof(LogFormats)/sizeof(*LogFormats))) {
debuga(_("Unknown line format found in input log file %s:\n%s\n"),arq,linebuf);
exit(EXIT_FAILURE);
}