Take in account that CURLAUTH_* bitmasks are now 'unsigned long'

Data type of internal vars holding CURLAUTH_* bitmasks changed from 'long' to
'unsigned long' for proper handling and operating.
This commit is contained in:
Yang Tse 2012-04-18 23:04:35 +02:00
parent 09690be8de
commit 9421b06397
5 changed files with 15 additions and 15 deletions

View file

@ -37,7 +37,7 @@ struct Configurable {
bool cookiesession; /* new session? */
bool encoding; /* Accept-Encoding please */
bool tr_encoding; /* Transfer-Encoding please */
long authtype; /* auth bitmask */
unsigned long authtype; /* auth bitmask */
bool use_resume;
bool resume_from_current;
bool disable_epsv;

View file

@ -680,7 +680,7 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
int authbits = 0;
int bitcheck = 0;
while(bitcheck < 32) {
if(config->authtype & (1 << bitcheck++)) {
if(config->authtype & (1UL << bitcheck++)) {
authbits++;
if(authbits > 1) {
/* more than one, we're done! */