diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-08-06 14:15:07 +0200 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-08-07 16:50:56 +0200 |
commit | f1b04c40ba9faf9b7b8969cf3686c35bb7b79b33 (patch) | |
tree | 9e37bde60e1aa7ee17bcd00fe77e5c48151ff224 /src/dialog.cc | |
parent | 83e88446c99f793f696984904e47070a287fd15d (diff) |
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
Diffstat (limited to 'src/dialog.cc')
-rw-r--r-- | src/dialog.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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"); |