} else {
debugs(79, DBG_IMPORTANT, "storeDiskdSend: msgsnd: " << xstrerror());
cbdataReferenceDone(M->callback_data);
- assert(++send_errors < 100);
+ ++send_errors;
+ assert(send_errors < 100);
if (shm_offset > -1)
shm.put(shm_offset);
}
debugs(79, 3, "DiskThreadsDiskFile::writeDone: FD " << fd << ", len " << len << ", err=" << errflag);
- assert(++loop_detect < 10);
+ ++loop_detect;
+ assert(loop_detect < 10);
--inProgressIOs;
if ( ::iamalive ) {
static char alivelist[4][3] = { "\\\b", "|\b", "/\b", "-\b" };
static unsigned short alivecount = 0;
- assert( write( STDOUT_FILENO, alivelist[alivecount++ & 3], 2 ) == 2 );
+ const int write_success = write(STDOUT_FILENO, alivelist[alivecount++ & 3], 2);
+ assert(write_success == 2);
}
bool flag = true;
case 'C':
if ( optarg && *optarg ) {
if ( copydir ) xfree( (void*) copydir );
- assert( (copydir = xstrdup(optarg)) );
+ copydir = xstrdup(optarg);
+ assert(copydir);
}
break;
case 'c':
if ( optarg && *optarg ) {
- if ( *conffile ) xfree((void*) conffile );
- assert( (conffile = xstrdup(optarg)) );
+ if ( *conffile ) xfree((void*) conffile);
+ conffile = xstrdup(optarg);
+ assert(conffile);
}
break;