char *p = string, c;
while ((c = *p)) {
*p = xtoupper(c);
- p++;
+ ++p;
}
}
char *p = string, c;
while ((c = *p)) {
*p = xtolower(c);
- p++;
+ ++p;
}
}
char addrstr[10] = {0};
char hexstr[16 * 3 + 5] = {0};
char charstr[16 * 1 + 5] = {0};
- for (n = 1; n <= size; n++) {
+ for (n = 1; n <= size; ++n) {
if (n % 16 == 1) {
/* store address for this line */
snprintf(addrstr, sizeof(addrstr), "%.4x", (int) (p - data));
strncat(hexstr, " ", sizeof(hexstr) - strlen(hexstr) - 1);
strncat(charstr, " ", sizeof(charstr) - strlen(charstr) - 1);
}
- p++; /* next byte */
+ ++p; /* next byte */
}
if (strlen(hexstr) > 0) {
t = strchr(host, ']');
if (!t)
return false;
- *t++ = '\0';
+ *t = '\0';
+ ++t;
if (*t != ':')
return false;
port = xatos(t + 1);
void
StoreMetaUnpacker::getType()
{
- type = buf[position++];
+ type = buf[position];
+ ++position;
}
void
while ((name = strtok(NULL, w_space)) != NULL) {
value = strchr(name, '=');
- if (value)
- *value++ = '\0'; /* cut on = */
+ if (value) {
+ *value = '\0'; /* cut on = */
+ ++value;
+ }
debugs(3,2, "SwapDir::parseOptions: parsing store option '" << name << "'='" << (value ? value : "") << "'");
register int readfds_handle = readfds.fd_array[j];
no_bits = 1;
- for ( fd = Biggest_FD; fd; fd-- ) {
+ for ( fd = Biggest_FD; fd; --fd ) {
if ( fd_table[fd].win32.handle == readfds_handle ) {
if (fd_table[fd].flags.open) {
no_bits = 0;
register int osfhandle;
no_bits = 1;
- for ( fd = Biggest_FD; fd; fd-- ) {
+ for ( fd = Biggest_FD; fd; --fd ) {
osfhandle = fd_table[fd].win32.handle;
if (( osfhandle == readfds_handle ) ||
for (j = 0; j < (int) errfds.fd_count; ++j) {
register int errfds_handle = errfds.fd_array[j];
- for ( fd = Biggest_FD; fd; fd-- ) {
+ for ( fd = Biggest_FD; fd; --fd ) {
if ( fd_table[fd].win32.handle == errfds_handle )
break;
}
register int writefds_handle = writefds.fd_array[j];
no_bits = 1;
- for ( fd = Biggest_FD; fd; fd-- ) {
+ for ( fd = Biggest_FD; fd; --fd ) {
if ( fd_table[fd].win32.handle == writefds_handle ) {
if (fd_table[fd].flags.open) {
no_bits = 0;
{
acl_nfmark * nfmarkAcls [] = { nfmarkToServer, nfmarkToClient };
- for (int i=0; i<2; i++) {
+ for (int i=0; i<2; ++i) {
while (nfmarkAcls[i]) {
acl_nfmark *l = nfmarkAcls[i];
if (l->nfmark > 0)
{
acl_tos * tosAcls [] = { tosToServer, tosToClient };
- for (int i=0; i<2; i++) {
+ for (int i=0; i<2; ++i) {
while (tosAcls[i]) {
acl_tos *l = tosAcls[i];
if (l->tos > 0)
x = 1;
while (args[x]) {
- strcat(buf1, args[x++]);
+ strcat(buf1, args[x]);
+ ++x;
strcat(buf1, " ");
}
if (!mp_stats.pool) /* pool destroyed */
continue;
- if (mp_stats.pool->getMeter().gb_allocated.count > 0) /* this pool has been used */
- sortme[npools++] = mp_stats;
- else
+ if (mp_stats.pool->getMeter().gb_allocated.count > 0) {
+ /* this pool has been used */
+ sortme[npools] = mp_stats;
+ ++npools;
+ } else {
++not_used;
+ }
}
memPoolIterateDone(&iter);
}
// ensure the last N entries are unset
while (index < ((size_t)size_)) {
- theList_[index++] = NULL;
+ theList_[index] = NULL;
+ ++index;
}
size_ -= n;
}
if (parent_)
parent_->noteConnectionAdded();
- theList_[size_++] = conn;
+ theList_[size_] = conn;
+ ++size_;
AsyncCall::Pointer readCall = commCbCall(5,4, "IdleConnList::Read",
CommIoCbPtrFun(IdleConnList::Read, this));
comm_read(conn, fakeReadBuf_, sizeof(fakeReadBuf_), readCall);
virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
static ACLSNMPCommunityStrategy *Instance();
/* Not implemented to prevent copies of the instance. */
- /* Not private to prevent brain dead g+++ warnings about
+ /* Not private to prevent brain dead g++ warnings about
* private constructors with no friends */
ACLSNMPCommunityStrategy(ACLSNMPCommunityStrategy const &);
}
// remove trailing line breaks
- while ( len > 0 && ( line[len] == '\n' || line[len] == '\r' ) )
- line[len--] = '\0';
+ while ( len > 0 && ( line[len] == '\n' || line[len] == '\r' ) ) {
+ line[len] = '\0';
+ --len;
+ }
// insert into list of expressions
if ( head == 0 ) tail = head = new REList(line,option=='F');