Skip to content

Commit

Permalink
Improve variable locality
Browse files Browse the repository at this point in the history
  • Loading branch information
tedjp committed Mar 29, 2012
1 parent 84a891a commit 253d297
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/entwatch.c
Expand Up @@ -15,11 +15,7 @@ int looping = 1;
int main(int argc, char* argv[])
{
int rfd = 0;
int entcnt = 0;
int r;
int waittime = 30;
char timebuf[512];
time_t now;

if(argc == 2) {
waittime = atoi(argv[1]);
Expand All @@ -38,6 +34,11 @@ int main(int argc, char* argv[])

// loop here, calling ioctl(rfd, RNDGETENTCNT) and printing the result
do {
int entcnt = 0;
char timebuf[512];
time_t now;
int r;

now = time(NULL);
r = ioctl(rfd, RNDGETENTCNT, &entcnt);
if(0 > r) {
Expand Down

0 comments on commit 253d297

Please sign in to comment.