minor clean up

remotes/push_mirror/vc9-vt-dnd
Tomasz Kojm 14 years ago
parent 62315ce69a
commit ce0c34d14e
  1. 11
      freshclam/mirman.c
  2. 3
      freshclam/notify.c

@ -170,12 +170,15 @@ static int mirman_update_int(uint32_t *ip, int af, struct mirdat *mdat, uint8_t
if(found) {
mdat->mirtab[i].atime = 0; /* will be updated in mirman_write() */
if(succ || fail) {
mdat->mirtab[i].fail += fail;
if(mdat->mirtab[i].fail < 0)
if((int) mdat->mirtab[i].fail + fail < 0)
mdat->mirtab[i].fail = 0;
mdat->mirtab[i].succ += succ;
if(mdat->mirtab[i].succ < 0)
else
mdat->mirtab[i].fail += fail;
if((int) mdat->mirtab[i].succ + succ < 0)
mdat->mirtab[i].succ = 0;
else
mdat->mirtab[i].succ += succ;
} else {
if(broken)
mdat->mirtab[i].fail++;

@ -59,7 +59,7 @@ int clamd_connect(const char *cfgfile, const char *option)
#endif
struct optstruct *opts;
const struct optstruct *opt;
int sockd, bread;
int sockd;
const char *socktype;
@ -188,7 +188,6 @@ int notify(const char *cfgfile)
{
char buff[20];
int sockd, bread;
const char *socktype;
if((sockd = clamd_connect(cfgfile, "NotifyClamd")) < 0)
return 1;

Loading…
Cancel
Save