rcsim: fix compiler warning

Origin commit data
------------------
Branch: ni/coolstream
Commit: 279c8d133c
Author: gixxpunk <thomas.harfmann@gmail.com>
Date: 2013-10-04 (Fri, 04 Oct 2013)

Origin message was:
------------------
- rcsim: fix compiler warning

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
gixxpunk
2013-10-04 09:44:34 +02:00
committed by vanhofen
parent 286a54c12d
commit 2d4b800df0

View File

@@ -180,7 +180,7 @@ int main (int argc, char **argv){
int evd;
unsigned long sendcode=KEY_0;
unsigned int keys = sizeof(keyname)/sizeof(struct key);
unsigned long time=0;
unsigned long rctime=0;
unsigned long reptime=500;
unsigned int offset;
@@ -212,7 +212,7 @@ int main (int argc, char **argv){
}
if (argc>=3){
time=(atol (argv[2])*1000)/reptime;
rctime=(atol (argv[2])*1000)/reptime;
}
#ifdef HAVE_DBOX_HARDWARE
@@ -224,13 +224,13 @@ int main (int argc, char **argv){
#else
evd = -1; // close(-1) does not harm... ;)
#endif
printf ("sending key %s for %ld seconds\n",keyname[offset].name,(reptime*time)/1000);
printf ("sending key %s for %ld seconds\n",keyname[offset].name,(reptime*rctime)/1000);
if (push (evd,sendcode,KEY_PRESSED)<0){
perror ("writing 'key_pressed' event failed");
close (evd);
return 1;
}
while (time--){
while (rctime--){
usleep(reptime*1000);
if (push (evd,sendcode,KEY_AUTOREPEAT)<0){
perror ("writing 'key_autorepeat' event failed");