{
int *a;
int i;
- int res;
+ bool res;
snew(a, atoms->nr);
*nra = 0;
for (i = 0; (i < atoms->nr); i++)
{
- res = !gmx_strcasecmp(restype[atoms->atom[i].resind], typestring);
- if (bMatch == FALSE)
+ res = gmx_strcasecmp(restype[atoms->atom[i].resind], typestring) == 0;
+ if (!bMatch)
{
res = !res;
}
char ** p_typename;
int iwater, iion;
int nwater, nion;
- int found;
+ bool found;
if (bVerb)
{
/* Note that this does not lead to a N*N loop, but N*K, where
* K is the number of residue _types_, which is small and independent of N.
*/
- found = 0;
+ found = false;
for (k = 0; k < ntypes && !found; k++)
{
- found = !strcmp(restype[i], p_typename[k]);
+ found = strcmp(restype[i], p_typename[k]) == 0;
}
if (!found)
{