Fixed compiler warnings - patch from Rune Magnussen

This commit is contained in:
Bill Cox
2015-08-10 07:54:54 -07:00
parent d87a49c282
commit dbc4dd0db9
2 changed files with 5 additions and 4 deletions

View File

@@ -279,11 +279,12 @@ int main(int argc, char **argv)
} else if(!strcmp(argv[xArg], "--multiplier") && xArg+1 < argc) {
xArg++;
multiplierAssigned = true;
outputMultiplier = atoi(argv[xArg]);
if(outputMultiplier < 0) {
int tmpOutputMult = atoi(argv[xArg]);
if(tmpOutputMult < 0) {
fputs("Multiplier must be >= 0\n", stderr);
return 1;
}
outputMultiplier = tmpOutputMult;
} else {
fputs("Usage: infnoise [options]\n"
"Options are:\n"

View File

@@ -64,8 +64,8 @@ void inmWriteEntropyStart(uint32_t bufLen, bool debug) {
void inmWaitForPoolToHaveRoom(void) {
int ent_count;
struct pollfd pfd = {
fd: inmDevRandomFD,
events: POLLOUT,
.fd = inmDevRandomFD,
.events = POLLOUT,
};
int64_t timeout_msec;
if (ioctl(inmDevRandomFD, RNDGETENTCNT, &ent_count) == 0 && ent_count < inmFillWatermark) {