Fix maxavrocheck build failure on Ubuntu Trusty

The return value of realpath should be checked even if it is pointless.
This commit is contained in:
Markus Mäkelä 2019-06-11 14:15:06 +03:00
parent 4716f5b48f
commit 5b14e28fc8
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -173,8 +173,11 @@ int main(int argc, char** argv)
for (int i = optind; i < argc; i++)
{
char pathbuf[PATH_MAX + 1];
snprintf(pathbuf, sizeof(pathbuf), "%s", argv[i]);
realpath(argv[i], pathbuf);
if (!realpath(argv[i], pathbuf))
{
snprintf(pathbuf, sizeof(pathbuf), "%s", argv[i]);
}
if (check_file(pathbuf))
{