lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue,  3 Jun 2014 21:22:04 +0200
From:	Fabian Frederick <fabf@...net.be>
To:	linux-kernel@...r.kernel.org
Cc:	Fabian Frederick <fabf@...net.be>, Jeff Mahoney <jeffm@...e.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH 1/1] fs/reiserfs/reiserfs.h: use ULLONG_MAX instead of ~0ULL

Use more explicit kernel.h definition

Cc: Jeff Mahoney <jeffm@...e.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@...net.be>
---
 fs/reiserfs/reiserfs.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/reiserfs/reiserfs.h b/fs/reiserfs/reiserfs.h
index 83d4eac..742ce52 100644
--- a/fs/reiserfs/reiserfs.h
+++ b/fs/reiserfs/reiserfs.h
@@ -1070,17 +1070,17 @@ static inline __u16 offset_v2_k_type(const struct offset_v2 *v2)
 static inline void set_offset_v2_k_type(struct offset_v2 *v2, int type)
 {
 	v2->v =
-	    (v2->v & cpu_to_le64(~0ULL >> 4)) | cpu_to_le64((__u64) type << 60);
+	    (v2->v & cpu_to_le64(ULLONG_MAX >> 4)) | cpu_to_le64((__u64) type << 60);
 }
 
 static inline loff_t offset_v2_k_offset(const struct offset_v2 *v2)
 {
-	return le64_to_cpu(v2->v) & (~0ULL >> 4);
+	return le64_to_cpu(v2->v) & (ULLONG_MAX >> 4);
 }
 
 static inline void set_offset_v2_k_offset(struct offset_v2 *v2, loff_t offset)
 {
-	offset &= (~0ULL >> 4);
+	offset &= (ULLONG_MAX >> 4);
 	v2->v = (v2->v & cpu_to_le64(15ULL << 60)) | cpu_to_le64(offset);
 }
 
-- 
1.8.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ