]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* include/grub/misc.h (grub_memcpy): Declare grub_memcpy with static
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 23 Oct 2011 21:25:06 +0000 (23:25 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 23 Oct 2011 21:25:06 +0000 (23:25 +0200)
inline function rather than a define.

ChangeLog
include/grub/misc.h

index 7eb57b134070aafec1bc3a00ab26059a3d940259..782da923ef7cb3b11a95230b8fe8a97d70e11adc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-23  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * include/grub/misc.h (grub_memcpy): Declare grub_memcpy with static
+       inline function rather than a define.
+
 2011-10-23  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * util/grub-setup.c: Add missing include.
index 0a0a4135ea79e0d6a32a1575aaebc5409bd64eb6..5bc159e7d2d8813a57a8e40dd5d0404e59cc60a2 100644 (file)
 #define COMPILE_TIME_ASSERT(cond) switch (0) { case 1: case !(cond): ; }
 
 #define grub_dprintf(condition, fmt, args...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, fmt, ## args)
-/* XXX: If grub_memmove is too slow, we must implement grub_memcpy.  */
-#define grub_memcpy(d,s,n)     grub_memmove ((d), (s), (n))
 
 void *EXPORT_FUNC(grub_memmove) (void *dest, const void *src, grub_size_t n);
 char *EXPORT_FUNC(grub_strcpy) (char *dest, const char *src);
 char *EXPORT_FUNC(grub_strncpy) (char *dest, const char *src, int c);
 char *EXPORT_FUNC(grub_stpcpy) (char *dest, const char *src);
 
+/* XXX: If grub_memmove is too slow, we must implement grub_memcpy.  */
+static inline void *
+grub_memcpy (void *dest, const void *src, grub_size_t n)
+{
+  return grub_memmove (dest, src, n);
+}
+
 static inline char *
 grub_strcat (char *dest, const char *src)
 {