aboutsummaryrefslogtreecommitdiff
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
-rw-r--r--html.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/html.c b/html.c
index 3a5d28d..957b326 100644
--- a/html.c
+++ b/html.c
@@ -45,7 +45,7 @@ void htmlf(const char *format, ...)
void html_txt(char *txt)
{
char *t = txt;
- while(t && *t){
+ while(*t){
int c = *t;
if (c=='<' || c=='>' || c=='&') {
*t = '\0';
@@ -68,7 +68,7 @@ void html_txt(char *txt)
void html_ntxt(int len, char *txt)
{
char *t = txt;
- while(t && *t && len--){
+ while(*t && len--){
int c = *t;
if (c=='<' || c=='>' || c=='&') {
*t = '\0';
@@ -97,7 +97,7 @@ void html_ntxt(int len, char *txt)
void html_attr(char *txt)
{
char *t = txt;
- while(t && *t){
+ while(*t){
int c = *t;
if (c=='<' || c=='>' || c=='\'') {
*t = '\0';
@@ -155,3 +155,4 @@ void html_filemode(unsigned short mode)
html_fileperm(mode >> 3);
html_fileperm(mode);
}
+