chiark / gitweb /
copy: rearrange flags field definition
authorLennart Poettering <lennart@poettering.net>
Fri, 23 Mar 2018 17:27:31 +0000 (18:27 +0100)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
Let's use the usual 1U << 0,1,2,3,4 spelling for definiting flags enums.

src/basic/copy.h

index faec0457894ce97127f312dfd2167a2d8fe6b1fb..8f5acdb7ce7b623148351d4752da63915eb797b4 100644 (file)
@@ -13,9 +13,9 @@
 #include <sys/types.h>
 
 typedef enum CopyFlags {
-        COPY_REFLINK    = 0x1,      /* try to reflink */
-        COPY_MERGE      = 0x2,      /* merge existing trees with our new one to copy */
-        COPY_REPLACE    = 0x4,      /* replace an existing file if there's one */
+        COPY_REFLINK = 1U << 0, /* Try to reflink */
+        COPY_MERGE   = 1U << 1, /* Merge existing trees with our new one to copy */
+        COPY_REPLACE = 1U << 2, /* Replace an existing file if there's one */
 } CopyFlags;
 
 #if 0 /// UNNEEDED by elogind