]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/kern/misc.c (grub_stpcpy): Move from here ...
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 26 Feb 2012 22:55:18 +0000 (23:55 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 26 Feb 2012 22:55:18 +0000 (23:55 +0100)
* include/grub/misc.h (grub_stpcpy): ... to here. Inlined.

ChangeLog
grub-core/kern/misc.c
include/grub/misc.h

index fdf601482f43fd4c24843c0f4e59c53a1fa169fa..4edcc69e295c4114e2623520ab4909545a056ea4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-02-26  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/kern/misc.c (grub_stpcpy): Move from here ...
+       * include/grub/misc.h (grub_stpcpy): ... to here. Inlined.
+
 2012-02-26  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * include/grub/env.h (grub_env_find): Remove prototype.
index cb49243d21c47fa596cf5cba43529214c259d0d7..ad67ed257fe3f2f791c04199043389ea7652a4cf 100644 (file)
@@ -103,19 +103,6 @@ grub_strncpy (char *dest, const char *src, int c)
   return dest;
 }
 
-char *
-grub_stpcpy (char *dest, const char *src)
-{
-  char *d = dest;
-  const char *s = src;
-
-  do
-    *d++ = *s;
-  while (*s++ != '\0');
-
-  return d - 1;
-}
-
 int
 grub_printf (const char *fmt, ...)
 {
index be5fa6007da52fb562f0fd51d219cdf735fee349..e3d61d75b8bcc1c5353180eb7a812d796ef68d6f 100644 (file)
 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);
+static inline char *
+grub_stpcpy (char *dest, const char *src)
+{
+  char *d = dest;
+  const char *s = src;
+
+  do
+    *d++ = *s;
+  while (*s++ != '\0');
+
+  return d - 1;
+}
 
 /* XXX: If grub_memmove is too slow, we must implement grub_memcpy.  */
 static inline void *