]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[utils] Add ply_round_to_multiple macro
authorRay Strode <rstrode@redhat.com>
Mon, 21 Sep 2009 17:49:43 +0000 (13:49 -0400)
committerRay Strode <rstrode@redhat.com>
Mon, 28 Sep 2009 15:23:40 +0000 (11:23 -0400)
We'll need something like this for rowstride calculation

src/libply/ply-utils.h

index 592a8e4e439ea38ccf9a429ef1fbf5a30b464d37..5e41f841b6b36cd8cc04ea03d23680672c766053 100644 (file)
@@ -46,6 +46,9 @@ typedef void (* ply_module_function_t) (void);
 typedef intptr_t ply_daemon_handle_t;
 
 #ifndef PLY_HIDE_FUNCTION_DECLARATIONS
+
+#define ply_round_to_multiple(n, m) (((n) + (((m) - 1))) & ~((m) - 1))
+
 bool ply_open_unidirectional_pipe (int *sender_fd,
                                    int *receiver_fd);
 int ply_connect_to_unix_socket (const char *path,