From f1b04c40ba9faf9b7b8969cf3686c35bb7b79b33 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Tue, 6 Aug 2024 14:15:07 +0200 Subject: Use dStrdup instead of strdup The strdup function is not available in POSIX-2001, so we use our own implementation in dlib: dStrdup. Reviewed-by: dogma --- src/dialog.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/dialog.cc') diff --git a/src/dialog.cc b/src/dialog.cc index 34928095..ac007315 100644 --- a/src/dialog.cc +++ b/src/dialog.cc @@ -32,6 +32,7 @@ #include "dialog.hh" #include "misc.h" #include "prefs.h" +#include "dlib/dlib.h" /* * Local Data @@ -190,7 +191,7 @@ const char *a_Dialog_input(const char *title, const char *msg) source = (char *)dList_nth_data(prefs.search_urls, i); if (!source || a_Misc_parse_search_url(source, &label, &url) < 0) continue; - pm[j++].label(FL_NORMAL_LABEL, strdup(label)); + pm[j++].label(FL_NORMAL_LABEL, dStrdup(label)); } } ch->tooltip("Select search engine"); -- cgit v1.2.3