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) { if(found) {
mdat->mirtab[i].atime = 0; /* will be updated in mirman_write() */ mdat->mirtab[i].atime = 0; /* will be updated in mirman_write() */
if(succ || fail) { if(succ || fail) {
mdat->mirtab[i].fail += fail; if((int) mdat->mirtab[i].fail + fail < 0)
if(mdat->mirtab[i].fail < 0)
mdat->mirtab[i].fail = 0; mdat->mirtab[i].fail = 0;
mdat->mirtab[i].succ += succ; else
if(mdat->mirtab[i].succ < 0) mdat->mirtab[i].fail += fail;
if((int) mdat->mirtab[i].succ + succ < 0)
mdat->mirtab[i].succ = 0; mdat->mirtab[i].succ = 0;
else
mdat->mirtab[i].succ += succ;
} else { } else {
if(broken) if(broken)
mdat->mirtab[i].fail++; mdat->mirtab[i].fail++;

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

Loading…
Cancel
Save