ssnprintf (filename, sizeof (filename), "%s/%s/info", dir, power_supply);
fh = fopen (filename, "r");
- if ((fh = fopen (filename, "r")) == NULL)
+ if (fh == NULL)
return (errno);
/* last full capacity: 40090 mWh */
ssnprintf (filename, sizeof (filename), "%s/%s/state", dir, power_supply);
fh = fopen (filename, "r");
- if ((fh = fopen (filename, "r")) == NULL)
+ if (fh == NULL)
{
if ((errno == EAGAIN) || (errno == EINTR) || (errno == ENOENT))
return (0);