[gnome-games] nintendo-ds: Use g_memdup2
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] nintendo-ds: Use g_memdup2
- Date: Sat, 20 Feb 2021 22:23:50 +0000 (UTC)
commit fe613fcf252e8a8b844e0d7bfdeb9d5d41231db5
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sun Feb 21 03:04:40 2021 +0500
nintendo-ds: Use g_memdup2
See https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538
Fix a deprecation warning.
plugins/nintendo-ds/src/nintendo-ds-icon-extract.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/nintendo-ds/src/nintendo-ds-icon-extract.c
b/plugins/nintendo-ds/src/nintendo-ds-icon-extract.c
index 9f7bd958..0c23995f 100644
--- a/plugins/nintendo-ds/src/nintendo-ds-icon-extract.c
+++ b/plugins/nintendo-ds/src/nintendo-ds-icon-extract.c
@@ -160,8 +160,8 @@ games_nintendo_ds_icon_extract (const char *uri,
}
/* Get the tile and palette data for the logo */
- tile_data = g_memdup (banner_data + TILE_DATA_OFFSET, TILE_DATA_LENGTH);
- palette_data = g_memdup (banner_data + PALETTE_DATA_OFFSET, PALETTE_DATA_LENGTH);
+ tile_data = g_memdup2 (banner_data + TILE_DATA_OFFSET, TILE_DATA_LENGTH);
+ palette_data = g_memdup2 (banner_data + PALETTE_DATA_OFFSET, PALETTE_DATA_LENGTH);
g_free (banner_data);
pixbuf = load_icon (tile_data, palette_data);
g_free (palette_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]