From: Ray Strode Date: Mon, 21 Sep 2009 17:49:43 +0000 (-0400) Subject: [utils] Add ply_round_to_multiple macro X-Git-Tag: 0.8.0~188^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=069839a58b971bce8e3904b1c1237bf78e37318f;p=thirdparty%2Fplymouth.git [utils] Add ply_round_to_multiple macro We'll need something like this for rowstride calculation --- diff --git a/src/libply/ply-utils.h b/src/libply/ply-utils.h index 592a8e4e..5e41f841 100644 --- a/src/libply/ply-utils.h +++ b/src/libply/ply-utils.h @@ -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,