]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
include/rados/librados.h: use UINT64_C to define constants 41392/head
authorKefu Chai <kchai@redhat.com>
Wed, 19 May 2021 01:30:08 +0000 (09:30 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 19 May 2021 01:33:25 +0000 (09:33 +0800)
UINT64_C add the appropriate suffix to literals, this is more readable
than casting the literal to the expected type.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/include/rados/librados.h

index 34cadf25b26515a54f57cb23b5a68677c26650d5..31ef332403ce207a688dcb185cb9d53ae6a49f0b 100644 (file)
@@ -167,8 +167,8 @@ typedef enum {
 /*
  * snap id contants
  */
-#define LIBRADOS_SNAP_HEAD  ((uint64_t)(-2))
-#define LIBRADOS_SNAP_DIR   ((uint64_t)(-1))
+#define LIBRADOS_SNAP_HEAD  UINT64_C(-2)
+#define LIBRADOS_SNAP_DIR   UINT64_C(-1)
 
 /**
  * @typedef rados_t