]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
include: fix IS_ERR on Windows 47923/head
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Fri, 26 Aug 2022 12:54:10 +0000 (12:54 +0000)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Fri, 2 Sep 2022 14:57:55 +0000 (14:57 +0000)
commitfd0cde0939e680549391949f0abe545e42062b6e
treed57e58650f9287754f496b02206304c006be5f51
parente15b781875c69668cafdb174c9a670e8174adbfa
include: fix IS_ERR on Windows

The "long" type uses 32b on x64 Windows platforms, which means
it's not large enough to store a pointer. intptr_t or uintptr_t
should be used instead.

This change fixes include/err.h, using the right types. There was
a previous patch on this topic but unfortunately it didn't address
all the type casts.

This issue was brought up by the unittest_crush test, which recently
started to fail as the CrushWrapper methods use IS_ERR.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit c95b6b6c774da05e989cd09e23eee1eeaa9e6ec2)
src/include/err.h