You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
kernel-wide: replace USHORT_MAX, SHORT_MAX and SHORT_MIN with USHRT_MAX, SHRT_MAX and SHRT_MIN
- C99 knows about USHRT_MAX/SHRT_MAX/SHRT_MIN, not USHORT_MAX/SHORT_MAX/SHORT_MIN. - Make SHRT_MIN of type s16, not int, for consistency. [akpm@linux-foundation.org: fix drivers/dma/timb_dma.c] [akpm@linux-foundation.org: fix security/keys/keyring.c] Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
940370fc86
commit
4be929be34
@@ -669,7 +669,7 @@ static void keyring_unlink_rcu_disposal(struct rcu_head *rcu)
|
||||
struct keyring_list *klist =
|
||||
container_of(rcu, struct keyring_list, rcu);
|
||||
|
||||
if (klist->delkey != USHORT_MAX)
|
||||
if (klist->delkey != USHRT_MAX)
|
||||
key_put(klist->keys[klist->delkey]);
|
||||
kfree(klist);
|
||||
}
|
||||
@@ -746,7 +746,7 @@ int __key_link_begin(struct key *keyring, const struct key_type *type,
|
||||
max += klist->maxkeys;
|
||||
|
||||
ret = -ENFILE;
|
||||
if (max > USHORT_MAX - 1)
|
||||
if (max > USHRT_MAX - 1)
|
||||
goto error_quota;
|
||||
size = sizeof(*klist) + sizeof(struct key *) * max;
|
||||
if (size > PAGE_SIZE)
|
||||
@@ -763,7 +763,7 @@ int __key_link_begin(struct key *keyring, const struct key_type *type,
|
||||
sizeof(struct key *) * klist->nkeys);
|
||||
nklist->delkey = klist->nkeys;
|
||||
nklist->nkeys = klist->nkeys + 1;
|
||||
klist->delkey = USHORT_MAX;
|
||||
klist->delkey = USHRT_MAX;
|
||||
} else {
|
||||
nklist->nkeys = 1;
|
||||
nklist->delkey = 0;
|
||||
|
||||
Reference in New Issue
Block a user