diff --git a/src/Cedar/Client.c b/src/Cedar/Client.c index bc8d1d57..a5508f09 100644 --- a/src/Cedar/Client.c +++ b/src/Cedar/Client.c @@ -8941,14 +8941,8 @@ bool CtSetPassword(CLIENT *c, RPC_CLIENT_PASSWORD *pass) { return false; } - if (pass->Password == NULL) - { - str = ""; - } - else - { - str = pass->Password; - } + + str = pass->Password; if (StrCmp(str, "********") != 0) { diff --git a/src/Cedar/Hub.c b/src/Cedar/Hub.c index a442ee21..4af7debb 100644 --- a/src/Cedar/Hub.c +++ b/src/Cedar/Hub.c @@ -6098,7 +6098,7 @@ void IntoTrafficLimiter(TRAFFIC_LIMITER *tr, PKT *p) } // Value increase - tr->Value += (UINT64)(p->PacketSize * 8); + tr->Value += p->PacketSize * (UINT64)8; } // The bandwidth reduction by traffic limiter diff --git a/src/Cedar/IPsec_IKE.c b/src/Cedar/IPsec_IKE.c index 9c7bc425..dfe56168 100644 --- a/src/Cedar/IPsec_IKE.c +++ b/src/Cedar/IPsec_IKE.c @@ -2792,7 +2792,7 @@ IPSECSA *NewIPsecSa(IKE_SERVER *ike, IKE_CLIENT *c, IKE_SA *ike_sa, bool initiat // Set the expiration time if (setting->LifeSeconds != 0) { - UINT64 span = (UINT64)(setting->LifeSeconds * 1000) + (UINT64)IKE_SOFT_EXPIRES_MARGIN; + UINT64 span = setting->LifeSeconds * (UINT64)1000 + (UINT64)IKE_SOFT_EXPIRES_MARGIN; sa->ExpiresHardTick = ike->Now + span; sa->ExpiresSoftTick = ike->Now + span; //sa->ExpiresSoftTick = ike->Now + (UINT64)5000; diff --git a/src/Cedar/IPsec_PPP.c b/src/Cedar/IPsec_PPP.c index 6c5a4e9e..e95e68cb 100644 --- a/src/Cedar/IPsec_PPP.c +++ b/src/Cedar/IPsec_PPP.c @@ -775,7 +775,7 @@ bool PPPParseUsername(CEDAR *cedar, char *src_username, ETHERIP_ID *dst) char src[MAX_SIZE]; // Validate arguments Zero(dst, sizeof(ETHERIP_ID)); - if (cedar == NULL || src == NULL || dst == NULL) + if (cedar == NULL || dst == NULL) { return false; } @@ -1318,7 +1318,7 @@ PPP_PACKET *PPPProcessRequestPacket(PPP_SESSION *p, PPP_PACKET *req) t = 1; } - p->DhcpRenewInterval = (UINT64)(t * 1000); + p->DhcpRenewInterval = t * (UINT64)1000; p->DhcpNextRenewTime = Tick64() + p->DhcpRenewInterval; if (true) diff --git a/src/Cedar/Session.c b/src/Cedar/Session.c index 4dc88553..451839a9 100644 --- a/src/Cedar/Session.c +++ b/src/Cedar/Session.c @@ -209,7 +209,7 @@ void SessionMain(SESSION *s) s->LastCommTime = Tick64(); if (s->ServerMode == false) { - s->NextConnectionTime = Tick64() + (UINT64)(s->ClientOption->AdditionalConnectionInterval * 1000); + s->NextConnectionTime = Tick64() + s->ClientOption->AdditionalConnectionInterval * (UINT64)1000; } s->NumConnectionsEstablished++; diff --git a/src/Mayaqua/Cfg.c b/src/Mayaqua/Cfg.c index a5fed440..895321b7 100644 --- a/src/Mayaqua/Cfg.c +++ b/src/Mayaqua/Cfg.c @@ -133,7 +133,7 @@ void BackupCfgWEx(CFG_RW *rw, FOLDER *f, wchar_t *original, UINT revision_number wchar_t datestr[MAX_PATH]; SYSTEMTIME st; // Validate arguments - if (f == NULL || filename == NULL || rw == NULL) + if (f == NULL || rw == NULL) { return; }