svn commit: samba r16855 - in trunk/source: . lib modules
Jeremy Allison
jra at samba.org
Fri Jul 7 05:09:38 GMT 2006
On Fri, Jul 07, 2006 at 04:56:34AM +0000, jpeach at samba.org wrote:
> + if (strwicmp(end, "K") == 0) {
> + lval *= 1024ULL;
> + } else if (strwicmp(end, "M") == 0) {
> + lval *= (1024ULL * 1024ULL);
> + } else if (strwicmp(end, "G") == 0) {
> + lval *= (1024ULL * 1024ULL * 1024ULL);
> + } else if (strwicmp(end, "T") == 0) {
> + lval *= (1024ULL * 1024ULL * 1024ULL * 1024ULL);
> + } else if (strwicmp(end, "P") == 0) {
> + lval *= (1024ULL * 1024ULL * 1024ULL * 1024ULL * 1024ULL);
James, portability warning....
Don't use LL - the compiler might not
have it.... Cast to SMB_BIG_INT and SMB_BIG_UINT instead ?
That's why we have the #ifdef HAVE_LONGLONG tests.
Jeremy.
More information about the samba-cvs
mailing list