Changeset 1090


Ignore:
Timestamp:
01/06/10 15:31:27 (11 years ago)
Author:
C.H.A.D.o
Message:

Fix parentheses warnings

Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r1084 r1090  
    248248# some optimisations
    249249if (OSCamOperatingSystem MATCHES "Mac OS X")
    250 add_definitions ("-O2 -Winline -Wall -Wno-parentheses -finline-functions -fomit-frame-pointer -m32")
     250add_definitions ("-O2 -Winline -Wall -finline-functions -fomit-frame-pointer -m32")
    251251else (OSCamOperatingSystem MATCHES "Mac OS X")
    252 add_definitions ("-O2 -Winline -Wall -Wno-parentheses -finline-functions -fomit-frame-pointer")
     252add_definitions ("-O2 -Winline -Wall -finline-functions -fomit-frame-pointer")
    253253endif (OSCamOperatingSystem MATCHES "Mac OS X")
    254254
  • trunk/Makefile

    r1084 r1090  
    6666        OS_CULI="-lncurses" \
    6767        OS_PTLI="-lpthread" \
    68         DS_OPTS="-O2 -DOS_LINUX -DCS_CONFDIR=${CS_CONFDIR} -Winline -Wall -Wno-parentheses -finline-functions -fomit-frame-pointer -D'CS_SVN_VERSION="\"$(SVN_REV)\""'" \
     68        DS_OPTS="-O2 -DOS_LINUX -DCS_CONFDIR=${CS_CONFDIR} -Winline -Wall -finline-functions -fomit-frame-pointer -D'CS_SVN_VERSION="\"$(SVN_REV)\""'" \
    6969        DS_CFLAGS="-c" \
    7070        DS_LDFLAGS="" \
     
    8787        OS_CULI="-lncurses" \
    8888        OS_PTLI="-lpthread -lpcsclite" \
    89         DS_OPTS="-O2 -DOS_LINUX -DCS_CONFDIR=${CS_CONFDIR} -DHAVE_PCSC=1 -I/usr/include/PCSC -Winline -Wall -Wno-implicit-function-declaration -Wno-parentheses -finline-functions -fomit-frame-pointer -D'CS_SVN_VERSION="\"$(SVN_REV)\""'" \
     89        DS_OPTS="-O2 -DOS_LINUX -DCS_CONFDIR=${CS_CONFDIR} -DHAVE_PCSC=1 -I/usr/include/PCSC -Winline -Wall -Wno-implicit-function-declaration -finline-functions -fomit-frame-pointer -D'CS_SVN_VERSION="\"$(SVN_REV)\""'" \
    9090        DS_CFLAGS="-c" \
    9191        DS_LDFLAGS="" \
     
    108108        OS_CULI="-lncurses" \
    109109        OS_PTLI="-lpthread" \
    110         DS_OPTS="-O2 -DOS_MACOSX -DNEED_DAEMON -DCS_NOSHM -DHAVE_PTHREAD_H -DUSE_PTHREAD -DCS_CONFDIR=${CS_CONFDIR} -DHAVE_PCSC=1 -Winline -Wall -Wno-implicit-function-declaration -Wno-parentheses -finline-functions -fomit-frame-pointer -D'CS_SVN_VERSION="\"$(SVN_REV)\""'" \
     110        DS_OPTS="-O2 -DOS_MACOSX -DNEED_DAEMON -DCS_NOSHM -DHAVE_PTHREAD_H -DUSE_PTHREAD -DCS_CONFDIR=${CS_CONFDIR} -DHAVE_PCSC=1 -Winline -Wall -Wno-implicit-function-declaration -finline-functions -fomit-frame-pointer -D'CS_SVN_VERSION="\"$(SVN_REV)\""'" \
    111111        DS_CFLAGS="-c" \
    112112        DS_LDFLAGS="-framework PCSC" \
  • trunk/module-camd33.c

    r470 r1090  
    5555  struct s_auth *account;
    5656
    57   if (client[cs_idx].crypted=cfg->c33_crypted)
     57  client[cs_idx].crypted=cfg->c33_crypted;
     58  if (client[cs_idx].crypted)
    5859  {
    5960    struct s_ip *p_ip;
  • trunk/module-camd35.c

    r1084 r1090  
    379379  }
    380380
    381   if (ptrp=getprotobyname("udp"))
     381  ptrp=getprotobyname("udp");
     382  if (ptrp)
    382383    p_proto=ptrp->p_proto;
    383384  else
  • trunk/module-monitor.c

    r822 r1090  
    175175  }
    176176  buf[n]='\0';
    177   if (n=strlen(trim((char *)buf)))
    178     client[cs_idx].last=time((time_t *) 0);
     177  n=strlen(trim((char *)buf));
     178  if (n) client[cs_idx].last=time((time_t *) 0);
    179179  return(n);
    180180}
  • trunk/module-newcamd.c

    r1084 r1090  
    356356{
    357357  int rc, rs;
     358
    358359  if (is_server)
     360  {
    359361    rs=network_message_receive(client[cs_idx].udp_fd,
    360362                               &client[cs_idx].ncd_msgid, buf,
    361363                               client[cs_idx].ncd_skey, COMMTYPE_SERVER);
     364  }
    362365  else
    363366  {
     
    367370                               reader[ridx].ncd_skey, COMMTYPE_CLIENT);
    368371  }
     372
    369373  if (rs<5) rc=(-1);
    370374  else rc=rs;
     375
    371376  cs_ddump(buf, rs, "received %d bytes from %s", rs, remote_txt());
    372377  client[cs_idx].last = time((time_t *) 0);
     378
    373379  if( rc==-1 )
     380  {
    374381    if (rs > 0)
    375     cs_log("packet to small (%d bytes)", rs);
     382      cs_log("packet to small (%d bytes)", rs);
    376383    else
    377384      cs_log("Connection closed to %s", remote_txt());
     385  }
    378386  return(rc);
    379387}
  • trunk/module-radegast.c

    r1084 r1090  
    4747  struct s_auth *account;
    4848  struct s_ip *p_ip;
     49
    4950  for (ok=0, p_ip=cfg->rad_allowed; (p_ip) && (!ok); p_ip=p_ip->next)
    5051    ok=((ip>=p_ip->ip[0]) && (ip<=p_ip->ip[1]));
     52
    5153  if (!ok)
    5254  {
     
    5456    cs_exit(0);
    5557  }
     58
    5659  for (ok=0, account=cfg->account; (cfg->rad_usr[0]) && (account) && (!ok); account=account->next)
    57     if (ok=(!strcmp(cfg->rad_usr, account->usr)))
    58       if (cs_auth_client(account, NULL))
    59         cs_exit(0);
     60  {
     61    ok=(!strcmp(cfg->rad_usr, account->usr));
     62    if (ok && cs_auth_client(account, NULL))
     63      cs_exit(0);
     64  }
     65
    6066  if (!ok)
    6167    cs_auth_client((struct s_auth *)(-1), NULL);
  • trunk/module-serial.c

    r575 r1090  
    881881    client[cs_idx].usr[0]='\0';
    882882    client[cs_idx].login=time((time_t *)0);
    883     if (pfd=init_oscam_ser_device(oscam_ser_device))
     883    pfd=init_oscam_ser_device(oscam_ser_device);
     884    if (pfd)
    884885      oscam_ser_server();
    885886    else
  • trunk/oscam-config.c

    r1083 r1090  
    605605
    606606  sprintf(c_caid, "%s%s", cs_confdir, cs_cert);
    607   if (fp=fopen(c_caid, "r"))
     607  fp=fopen(c_caid, "r");
     608  if (fp)
    608609  {
    609610    for (; (!rc) && fgets(c_caid, sizeof(c_caid), fp);)
    610611    {
    611612      char *c_provid, *c_key;
    612       if (c_provid=strchr(c_caid, '#'))
    613         *c_provid='\0';
     613
     614      c_provid=strchr(c_caid, '#');
     615      if (c_provid) *c_provid='\0';
    614616      if (!(c_provid=strchr(c_caid, ':'))) continue;
    615617      *c_provid++='\0';
  • trunk/oscam.c

    r1070 r1090  
    845845      if (account->dyndns[0])
    846846      {
    847         if (rht=gethostbyname((const char *)account->dyndns))
     847        rht=gethostbyname((const char *)account->dyndns);
     848        if (rht)
    848849        {
    849850          memcpy(&udp_sa.sin_addr, rht->h_addr, sizeof(udp_sa.sin_addr));
     
    863864  pthread_t tid;
    864865
    865   if (i=pthread_create(&tid, (pthread_attr_t *)0, (void *)&cs_client_resolve, (void *) 0))
     866  i=pthread_create(&tid, (pthread_attr_t *)0, (void *)&cs_client_resolve, (void *) 0);
     867  if (i)
    866868    cs_log("ERROR: can't create resolver-thread (err=%d)", i);
    867869  else
     
    881883    {
    882884      client[cs_idx].last=time((time_t)0);
    883       if (rht=gethostbyname(reader[i].device))
     885      rht=gethostbyname(reader[i].device);
     886      if (rht)
    884887      {
    885888        memcpy(&client[idx].udp_sa.sin_addr, rht->h_addr,
  • trunk/reader-common.c

    r1006 r1090  
    423423{
    424424  int rc=-1;
    425   if (rc=reader_checkhealth())
     425
     426  rc=reader_checkhealth();
     427  if (rc)
    426428  {
    427429    client[cs_idx].last=time((time_t)0);
  • trunk/reader-cryptoworks.c

    r473 r1090  
    236236      RSA(cta_res+2, cta_res+2, 0x40, &exp, ipk, 0);
    237237      BN_free(ipk);
    238       if (ucpk_valid=(cta_res[2]==((mfid & 0xFF)>>1)))
     238      ucpk_valid=(cta_res[2]==((mfid & 0xFF)>>1));
     239      if (ucpk_valid)
    239240      {
    240241        cta_res[2]|=0x80;
     
    244245      else
    245246      {
    246         if (ucpk_valid=(keybuf[0]==(((mfid & 0xFF)>>1)|0x80)))
     247        ucpk_valid=(keybuf[0]==(((mfid & 0xFF)>>1)|0x80));
     248        if (ucpk_valid)
    247249        {
    248250          BN_bin2bn(keybuf, 0x40, &ucpk);
  • trunk/reader-irdeto.c

    r470 r1090  
    291291  int i, l=(ep->emm[3]&0x07), ok=0;
    292292  int mode=(ep->emm[3]>>3);
     293
    293294  uchar *emm=ep->emm;
    294295  ep->type=emm[3];
    295296  if (mode&0x10)        // Hex addressed
     297  {
    296298    ok=(mode==reader[ridx].hexserial[3] &&
    297299       (!l || !memcmp(&emm[4], reader[ridx].hexserial, l)));
     300  }
    298301  else              // Provider addressed
     302  {
    299303    for(i=0; i<reader[ridx].nprov; i++)
    300       if (ok=(mode==reader[ridx].prid[i][0] &&
    301              (!l || !memcmp(&emm[4], &reader[ridx].prid[i][1], l))))
    302         break;
     304    {
     305      ok=(mode==reader[ridx].prid[i][0] &&
     306         (!l || !memcmp(&emm[4], &reader[ridx].prid[i][1], l)));
     307      if (ok) break;
     308    }
     309  }
     310
    303311  if (ok)
    304312  {
Note: See TracChangeset for help on using the changeset viewer.