else
if (!(fcontrol = fopen(ccontrol, "w")))
return;
- if (!(buf = (char *)malloc (512)))
+ if ((buf = (char *)malloc (512)) == NULL)
return;
/*
return 0;
- if (!(buf = (char *)malloc (512)))
+ if ((buf = (char *)malloc (512)) == NULL)
return 0;
/*
if ((recindex = rec_index(ident, REC_A)) != -1)
{
if (recA[recindex].type != IGN)
- if ((valA[recindex] = (char *)malloc (strlen(line)+1)))
+ if ((valA[recindex] = (char *)malloc (strlen(line)+1)) != NULL)
strcpy(valA[recindex], line);
} else {
if (! strcasecmp (ident, "euro"))
}
}
if (textindex < MAX_TEXT) {
- if ((cp = (char *)malloc (strlen (line) + 1))) {
- strcpy (cp, line);
- cp[strlen (line)] = '\0';
- text[textindex++] = cp;
- }
+ if ((cp = (char *)malloc (strlen (line) + 1)) == NULL)
+ return 0;
+ strcpy (cp, line);
+ cp[strlen (line)] = '\0';
+ text[textindex++] = cp;
}
} else {
len = strlen(line);
for (i=0; line[i]; i++) if (line[i] == ',') line[i] = '.';
if ((cp = strchr (line, '.')) == NULL) {
- if (!(valC[recindex] = (char *)malloc (strlen(line)+4)))
+ if ((valC[recindex] = (char *)malloc (strlen(line)+4)) == NULL)
return 0;
sprintf (valC[recindex], "%s.00", line);
} else if ( ((len = cp - line + 3)) < strlen (line)) {
- if (!(valC[recindex] = (char *)malloc (len+1)))
+ if ((valC[recindex] = (char *)malloc (len+1)) == NULL)
return 0;
strncpy (valC[recindex], line, len);
valC[recindex][len] = '\0';
} else {
- if (!(valC[recindex] = (char *)malloc (strlen(line)+1)))
+ if ((valC[recindex] = (char *)malloc (strlen(line)+1)) == NULL)
return 0;
strcpy(valC[recindex], line);
}
} else {
- if ((valC[recindex] = (char *)malloc (strlen(line)+1)))
- strcpy(valC[recindex], line);
- else
+ if ((valC[recindex] = (char *)malloc (strlen(line)+1)) == NULL)
return 0;
+ strcpy(valC[recindex], line);
}
}
}