Skip to content

Commit

Permalink
[gsupplicant] Use gutil_memdup() instead of g_memdup(). JB#41874
Browse files Browse the repository at this point in the history
g_memdup has been deprecated since glib 2.68
  • Loading branch information
monich committed May 16, 2021
1 parent cca2eb4 commit f99ca98
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions rpm/libgsupplicant.spec
Expand Up @@ -7,7 +7,7 @@ License: BSD
URL: https://git.sailfishos.org/mer-core/libgsupplicant
Source: %{name}-%{version}.tar.bz2

%define libglibutil_version 1.0.21
%define libglibutil_version 1.0.52

BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gio-2.0)
Expand All @@ -31,7 +31,7 @@ This package contains the development library for %{name}.
%setup -q

%build
make LIBDIR=%{_libdir} KEEP_SYMBOLS=1 release pkgconfig
make %{_smp_mflags} LIBDIR=%{_libdir} KEEP_SYMBOLS=1 release pkgconfig

%install
rm -rf %{buildroot}
Expand Down
6 changes: 3 additions & 3 deletions src/gsupplicant_bss.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2015-2020 Jolla Ltd.
* Copyright (C) 2015-2020 Slava Monich <slava.monich@jolla.com>
* Copyright (C) 2015-2021 Jolla Ltd.
* Copyright (C) 2015-2021 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
*
Expand Down Expand Up @@ -910,7 +910,7 @@ gsupplicant_bss_update_rates(

/* Store the rates */
g_free(priv->rates_values);
priv->rates_values = g_memdup(values, sizeof(guint)*n);
priv->rates_values = gutil_memdup(values, sizeof(guint)*n);
priv->rates.values = priv->rates_values;
priv->rates.count = n;
self->rates = &priv->rates;
Expand Down

0 comments on commit f99ca98

Please sign in to comment.