From: Adam Dickmeiss Date: Wed, 10 Jan 2007 10:17:50 +0000 (+0000) Subject: Avoid warning about integer overflow on Sun C compiler X-Git-Tag: rather.stable.2007.01.11~17 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=0900da0f443362be1efd1a59d2aae7c227487099;p=pazpar2-moved-to-github.git Avoid warning about integer overflow on Sun C compiler --- diff --git a/src/http_command.c b/src/http_command.c index d03387d..4598013 100644 --- a/src/http_command.c +++ b/src/http_command.c @@ -1,5 +1,5 @@ /* - * $Id: http_command.c,v 1.15 2007-01-09 22:27:10 quinn Exp $ + * $Id: http_command.c,v 1.16 2007-01-10 10:17:50 adam Exp $ */ #include @@ -99,7 +99,7 @@ unsigned int make_sessionid() if (gettimeofday(&t, 0) < 0) abort(); res = t.tv_sec; - res = ((res << 8) | (seq & 0xff)) & ((unsigned int) (1 << 31) - 1); + res = ((res << 8) | (seq & 0xff)) & ((1U << 31) - 1); return res; }