Ignore:
Timestamp:
2023-04-01T20:29:42Z (20 months ago)
Author:
GitHub <noreply@…>
Branches:
master
Children:
10425b2
Parents:
a4ac9c4
git-author:
David Cantrell <dcantrell@…> (01-04-23 20:29:42)
git-committer:
GitHub <noreply@…> (01-04-23 20:29:42)
Message:

Use g_memdup2() with glib versions >= 2.68.0 (#168)

  • Use g_memdup2() with glib versions >= 2.68.0

g_memdup() was deprecated in glib 2.68.0. The new function is
g_memdup2(). Still support building with older versions of glib via
macros.

Signed-off-by: David Cantrell <dcantrell@…>

  • Fall back to g_memdup when g_memdup2 is not available, rather than defining custom macro

Signed-off-by: David Cantrell <dcantrell@…>
Co-authored-by: Jelmer Vernooij <jelmer@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/io.c

    ra4ac9c4 r552da22  
    6363                /* If the queue is empty, allocate a new buffer. */
    6464                jd->tx_len = len;
    65                 jd->txq = g_memdup(buf, len);
     65                jd->txq = g_memdup2(buf, len);
    6666
    6767                /* Try if we can write it immediately so we don't have to do
     
    134134                char *s;
    135135
    136                 s = g_memdup(jd->txq + st, jd->tx_len - st);
     136                s = g_memdup2(jd->txq + st, jd->tx_len - st);
    137137                jd->tx_len -= st;
    138138                g_free(jd->txq);
Note: See TracChangeset for help on using the changeset viewer.