Fix two potential NULL dereferences caught by Clang.

This commit is contained in:
Michael R Sweet 2009-03-17 05:51:59 +00:00
parent 9643c13183
commit fcdfa5a09d
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/REC-html4/loose.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documentation</title>

View File

@ -2739,7 +2739,7 @@ write_description(
else
ptr --;
if (element[0])
if (element && *element)
fprintf(out, "<code>%s</code>", start);
else if (element)
fputs(start, out);
@ -2757,7 +2757,7 @@ write_description(
else
ptr --;
if (element[0])
if (element && *element)
fprintf(out, "<a href=\"#%s\"><code>%s</code></a>", start, start);
else if (element)
fputs(start, out);