Avoid quiet conversion of pointer to bool

* src/location.c (caret_set_file):
* src/scan-code.l (contains_dot_or_dash):
Do not quietly convert pointer to bool, as Oracle Developer Studio
12.6 complains and it is arguably confusing style anyway.
This commit is contained in:
Paul Eggert
2019-10-05 01:07:52 -07:00
parent b75b055288
commit 8f5aaa0e04
2 changed files with 2 additions and 2 deletions

View File

@@ -257,7 +257,7 @@ caret_set_file (const char *file)
caret_free ();
}
}
return caret_info.file;
return !!caret_info.file;
}
void caret_init (void)

View File

@@ -216,7 +216,7 @@ is_dot_or_dash (char ch)
static inline bool
contains_dot_or_dash (const char* p)
{
return strpbrk(p, ".-");
return !!strpbrk (p, ".-");
}
/* Defines a variant of a symbolic name resolution. */