dthelp: Further coverity fixes
This commit is contained in:
@@ -210,7 +210,11 @@ SEARCH *searchp;
|
||||
char *mb_entcontent;
|
||||
|
||||
mb_entcontent = MakeMByteString(entcontent);
|
||||
if (!*mb_entcontent) return NULL; /* null file name, don't open a directory */
|
||||
if (!*mb_entcontent) /* null file name, don't open a directory */
|
||||
{
|
||||
m_free(mb_entcontent, "multi-byte string");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
open = fopen(mb_entcontent, "r");
|
||||
if (open)
|
||||
@@ -301,7 +305,9 @@ void m_signmsg(p)
|
||||
if (q = strstr(p, VERSION)) {
|
||||
pCopy = strdup(p);
|
||||
q = strstr(pCopy, VERSION);
|
||||
*q = M_EOS;
|
||||
if(q) {
|
||||
*q = M_EOS;
|
||||
}
|
||||
m_errline(pCopy);
|
||||
free(pCopy);
|
||||
return;
|
||||
|
||||
@@ -870,9 +870,10 @@ static char ident6[]="@(#) (c) Copyright 1993, 1994 Unix System Labs, Inc., a su
|
||||
{
|
||||
char *mb_content, snb_id[32];
|
||||
char buffer[BIGBUF];
|
||||
static M_WCHAR empty = M_EOS;
|
||||
static M_WCHAR empty[1];
|
||||
empty[0] = M_EOS;
|
||||
|
||||
if (!f_content) f_content = ∅
|
||||
if (!f_content) f_content = empty;
|
||||
|
||||
mb_content = MakeMByteString(f_content);
|
||||
sprintf(snb_id, "%s%d", sdlReservedName, NextId());
|
||||
|
||||
@@ -153,6 +153,9 @@ FILE *tex;
|
||||
|
||||
strcpy(helpext, ".xrh");
|
||||
tex = fopen(helpbase, "w");
|
||||
if (! tex) {
|
||||
return;
|
||||
}
|
||||
fprintf(tex, "\\gobble\001%s\002%%\n", m_signon);
|
||||
fputs("% Generated Cross-Reference Macros (for a particular document)\n", tex);
|
||||
if (! xtree.data) {
|
||||
|
||||
@@ -93,7 +93,6 @@ void m_free(block, msg)
|
||||
#if defined(MSDOS)
|
||||
if (m_heapchk) m_heapdump() ;
|
||||
#endif
|
||||
free(block) ;
|
||||
if (m_malftrace) {
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)
|
||||
snprintf(buffer, 32, "%5x:%5x",
|
||||
@@ -107,6 +106,7 @@ void m_free(block, msg)
|
||||
m_trace(msg) ;
|
||||
m_trace("\n") ;
|
||||
}
|
||||
free(block) ;
|
||||
#if defined(MSDOS)
|
||||
if (m_heapchk) m_heapdump() ;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user