chiark / gitweb /
sd128: rename SD_FORMAT_ID128_STR to SD_ID128_FORMAT_STR to follow naming scheme
authorLennart Poettering <lennart@poettering.net>
Wed, 4 Jan 2012 01:13:41 +0000 (02:13 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 4 Jan 2012 01:13:41 +0000 (02:13 +0100)
src/sd-id128.h
src/test-id128.c

index 2ae100242f0b03ce53070de74cae0ae5a841c357..d835cf47688671fce90dff0936267c5ea87ec335 100644 (file)
@@ -49,12 +49,12 @@ int sd_id128_get_boot(sd_id128_t *ret);
         ((sd_id128_t) { .bytes = { 0x##v0, 0x##v1, 0x##v2, 0x##v3, 0x##v4, 0x##v5, 0x##v6, 0x##v7, \
                                    0x##v8, 0x##v9, 0x##v10, 0x##v11, 0x##v12, 0x##v13, 0x##v14, 0x##v15 }})
 
         ((sd_id128_t) { .bytes = { 0x##v0, 0x##v1, 0x##v2, 0x##v3, 0x##v4, 0x##v5, 0x##v6, 0x##v7, \
                                    0x##v8, 0x##v9, 0x##v10, 0x##v11, 0x##v12, 0x##v13, 0x##v14, 0x##v15 }})
 
-/* Note that SD_FORMAT_ID128_VAL will evaluate the passed argument 16
+/* Note that SD_ID128_FORMAT_VAL will evaluate the passed argument 16
  * times. It is hence not a good idea to call this macro with an
  * expensive function as paramater or an expression with side
  * effects */
  * times. It is hence not a good idea to call this macro with an
  * expensive function as paramater or an expression with side
  * effects */
-#define SD_FORMAT_ID128_STR "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
-#define SD_FORMAT_ID128_VAL(x) (x).bytes[0], (x).bytes[1], (x).bytes[2], (x).bytes[3], (x).bytes[4], (x).bytes[5], (x).bytes[6], (x).bytes[7], (x).bytes[8], (x).bytes[9], (x).bytes[10], (x).bytes[11], (x).bytes[12], (x).bytes[13], (x).bytes[14], (x).bytes[15]
+#define SD_ID128_FORMAT_STR "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
+#define SD_ID128_FORMAT_VAL(x) (x).bytes[0], (x).bytes[1], (x).bytes[2], (x).bytes[3], (x).bytes[4], (x).bytes[5], (x).bytes[6], (x).bytes[7], (x).bytes[8], (x).bytes[9], (x).bytes[10], (x).bytes[11], (x).bytes[12], (x).bytes[13], (x).bytes[14], (x).bytes[15]
 
 static inline bool sd_id128_equal(sd_id128_t a, sd_id128_t b) {
         return memcmp(&a, &b, 16) == 0;
 
 static inline bool sd_id128_equal(sd_id128_t a, sd_id128_t b) {
         return memcmp(&a, &b, 16) == 0;
index 520a49636670db55e51a961d36735ba3af229a08..d7c9d4326e75b057070c39bee4a0a552e5443811 100644 (file)
@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) {
 
         printf("waldi: %s\n", sd_id128_to_string(ID128_WALDI, t));
 
 
         printf("waldi: %s\n", sd_id128_to_string(ID128_WALDI, t));
 
-        printf("waldi2: " SD_FORMAT_ID128_STR "\n", SD_FORMAT_ID128_VAL(ID128_WALDI));
+        printf("waldi2: " SD_ID128_FORMAT_STR "\n", SD_ID128_FORMAT_VAL(ID128_WALDI));
 
         return 0;
 }
 
         return 0;
 }