URL: https://github.com/SSSD/sssd/pull/5838
Author: justin-stephenson
 Title: #5838: Tests: Fix warning about deprecated res_randomid()
Action: synchronized

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5838/head:pr5838
git checkout pr5838
From 2157ab52a05253d82a5c8978cab55172f95fac1f Mon Sep 17 00:00:00 2001
From: Justin Stephenson <jstep...@redhat.com>
Date: Mon, 25 Oct 2021 11:51:28 -0400
Subject: [PATCH] Tests: Fix warning about deprecated res_randomid()

---
 src/tests/cmocka/test_resolv_fake.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/tests/cmocka/test_resolv_fake.c b/src/tests/cmocka/test_resolv_fake.c
index 0f4011a39f..021d55abff 100644
--- a/src/tests/cmocka/test_resolv_fake.c
+++ b/src/tests/cmocka/test_resolv_fake.c
@@ -59,10 +59,10 @@ static ssize_t dns_header(unsigned char **buf, size_t ancount)
     memset(hb, 0, NS_HFIXEDSZ);
     memset(&h, 0, sizeof(h));
 
-    h.id = res_randomid();     /* random query ID */
-    h.qr = 1;                  /* response flag */
-    h.rd = 1;                  /* recursion desired */
-    h.ra = 1;                  /* recursion available */
+    h.id = 0xFFFF & sss_rand();  /* random query ID */
+    h.qr = 1;                    /* response flag */
+    h.rd = 1;                    /* recursion desired */
+    h.ra = 1;                    /* recursion available */
 
     h.qdcount = htons(1);          /* no. of questions */
     h.ancount = htons(ancount);    /* no. of answers */
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to