return(NULL) is correct for the other functions here but not for this
one, since it's meant to return a DtHELP_ error code. The man page also
says it should also set *widget to NULL on error.
---
 cde/lib/DtSvc/DtUtil2/SunDtHelp.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/cde/lib/DtSvc/DtUtil2/SunDtHelp.c 
b/cde/lib/DtSvc/DtUtil2/SunDtHelp.c
index 759a87554..b133fdc8b 100644
--- a/cde/lib/DtSvc/DtUtil2/SunDtHelp.c
+++ b/cde/lib/DtSvc/DtUtil2/SunDtHelp.c
@@ -163,8 +163,10 @@ int _DtHelpReturnSelectedWidgetId(
     status = pmySUNWProcList  || SUNWDtHelpdlopen();
     _DtSvcProcessUnlock();
 
-    if (!status)
-        return(NULL);
+    if (!status) {
+       *widget = NULL;
+       return(DtHELP_SELECT_ERROR);
+    }
 
     return ((*pmySUNWProcList->DtHelpReturnSelectedWidgetIdSym)(parent, cursor,
                                                            widget));
-- 
2.32.0



_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to