gst: g_memmove() is deprecated

Just use plain memmove(), g_memmove() is deprecated in
recent GLib versions.

https://bugzilla.gnome.org/show_bug.cgi?id=712811
This commit is contained in:
Tim-Philipp Müller 2013-11-21 15:04:04 +00:00
parent 8162a583a4
commit 4afa63a8ba
3 changed files with 7 additions and 7 deletions

View file

@ -282,7 +282,7 @@ _replace_memory (GstBuffer * buffer, guint len, guint idx, guint length,
}
if (end < len) {
g_memmove (&GST_BUFFER_MEM_PTR (buffer, idx),
memmove (&GST_BUFFER_MEM_PTR (buffer, idx),
&GST_BUFFER_MEM_PTR (buffer, end), (len - end) * sizeof (gpointer));
}
GST_BUFFER_MEM_LEN (buffer) = len - length;

View file

@ -562,7 +562,7 @@ prettify_structure_string (gchar * str)
if (count > MAX_BUFFER_DUMP_STRING_LEN) {
memcpy (pos + MAX_BUFFER_DUMP_STRING_LEN - 6, "..", 2);
memcpy (pos + MAX_BUFFER_DUMP_STRING_LEN - 4, pos + count - 4, 4);
g_memmove (pos + MAX_BUFFER_DUMP_STRING_LEN, pos + count,
memmove (pos + MAX_BUFFER_DUMP_STRING_LEN, pos + count,
strlen (pos + count) + 1);
pos += MAX_BUFFER_DUMP_STRING_LEN;
}
@ -2153,7 +2153,7 @@ __gst_info_fallback_vasprintf (char **result, char const *format, va_list args)
continue;
}
len = strlen (c + 4);
g_memmove (c + 2, c + 4, len + 1);
memmove (c + 2, c + 4, len + 1);
c += 2;
}
while ((c = strstr (clean_format, "%P"))) /* old GST_PTR_FORMAT */

View file

@ -426,7 +426,7 @@ gst_uri_get_location (const gchar * uri)
g_ascii_isalpha (unescaped[1]) &&
(unescaped[2] == ':' || unescaped[2] == '|')) {
unescaped[2] = ':';
g_memmove (unescaped, unescaped + 1, strlen (unescaped + 1) + 1);
memmove (unescaped, unescaped + 1, strlen (unescaped + 1) + 1);
}
#endif
@ -801,7 +801,7 @@ gst_file_utils_canonicalise_path (const gchar * path)
if (strcmp (*p, ".") == 0) {
/* just move all following parts on top of this, incl. NUL terminator */
g_free (*p);
g_memmove (p, p + 1, (g_strv_length (p + 1) + 1) * sizeof (gchar *));
memmove (p, p + 1, (g_strv_length (p + 1) + 1) * sizeof (gchar *));
/* re-check the new current part again in the next iteration */
continue;
} else if (strcmp (*p, "..") == 0 && p > parts) {
@ -809,7 +809,7 @@ gst_file_utils_canonicalise_path (const gchar * path)
* NUL terminator */
g_free (*(p - 1));
g_free (*p);
g_memmove (p - 1, p + 1, (g_strv_length (p + 1) + 1) * sizeof (gchar *));
memmove (p - 1, p + 1, (g_strv_length (p + 1) + 1) * sizeof (gchar *));
/* re-check the new current part again in the next iteration */
--p;
continue;
@ -821,7 +821,7 @@ gst_file_utils_canonicalise_path (const gchar * path)
num_parts = g_strv_length (parts) + 1; /* incl. terminator */
parts = g_renew (gchar *, parts, num_parts + 1);
g_memmove (parts + 1, parts, num_parts * sizeof (gchar *));
memmove (parts + 1, parts, num_parts * sizeof (gchar *));
parts[0] = g_strdup ("/");
}