comparison src/scanner.cpp @ 438:1686cb639269 stable-6-0-65

code cleanup
author Carl Byington <carl@five-ten-sg.com>
date Fri, 03 Nov 2017 10:50:12 -0700
parents a99b6c1f5f67
children f5b394bec28c
comparison
equal deleted inserted replaced
437:f084285ceb52 438:1686cb639269
1285 int n = sizeof(mbuf) - 1; 1285 int n = sizeof(mbuf) - 1;
1286 if (len < n) n = len; 1286 if (len < n) n = len;
1287 memcpy(mbuf, buf, n); 1287 memcpy(mbuf, buf, n);
1288 mbuf[n] = '\0'; 1288 mbuf[n] = '\0';
1289 snprintf(msg, sizeof(msg), "%s sees %s", myname, mbuf); 1289 snprintf(msg, sizeof(msg), "%s sees %s", myname, mbuf);
1290 msg[sizeof(msg)-1] = '\0';
1291 memory->syslog(msg); 1290 memory->syslog(msg);
1292 } 1291 }
1293 for (int i=0; i<len; i++) { 1292 for (int i=0; i<len; i++) {
1294 if (count == (PENDING_LIMIT-1)) error(NULL); 1293 if (count == (PENDING_LIMIT-1)) error(NULL);
1295 if (st >= end_state) error("finite state machine impossible state"); 1294 if (st >= end_state) error("finite state machine impossible state");