Remove unnecessary if
PATCH 1/2 Remove unnecessary if
Signed-off-by Sean Young <[email protected]>
--- utils/ir-ctl/ir-ctl.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)
utils/ir-ctl/ir-ctl.c +7 -9
@@ -175,19 +175,17 @@ static bool strtoscancode(const char *p, unsigned *ret)static unsigned parse_emitters (char *p) {unsigned emit =0 ; -const char *sep =" ,;:" ; +static const char *sep =" ,;:" ;char *saveptr, *q; q =strtok_r (p, sep, &saveptr);while (q) { -if (*q) { -char *endptr; -long e =strtol (q, &endptr,10 ); -if ((endptr && *endptr) || e <=0 || e >32 ) -return 0 ; +char *endptr; +long e =strtol (q, &endptr,10 ); +if ((endptr && *endptr) || e <=0 || e >32 ) +return 0 ; - emit |=1 << (e -1 ); - } + emit |=1 << (e -1 ); q =strtok_r (NULL , sep, &saveptr); }
@@ -200,7 +198,7 @@ static struct file *read_file(struct arguments *args, const char *fname)int lineno =0 , lastspace =0 ;char line[1024 ];int len =0 ; -const char *whitespace =" \n\r\t" ; +static const char *whitespace =" \n\r\t" ;struct file *f;FILE *input =fopen (fname,"r" );
Signature · 1 line
2.17.1
PATCH 2/2 ir-ctl: different drivers have different default timeouts
A driver might not support setting the timeout either, in addition, if a device does not support measuring the carrier, or has no wideband receiver, this command will also produce an error.
Signed-off-by Sean Young <[email protected]>
--- utils/ir-ctl/ir-ctl.1.in | 4 ---- 1 file changed, 4 deletions(-)
utils/ir-ctl/ir-ctl.1.in +0 -4
@@ -224,10 +224,6 @@ To send the pulse and space file \fBplay\fR on emitter 3: To send the rc-5 hauppauge '1' scancode: .br \fBir\-ctl \-S rc5:0x1e01 -.PP -To restore the IR receiver on /dev/lirc2 to the default state: -.br - \fBir\-ctl \-Mn \-\-timeout 125000 \-\-device=/dev/lirc2\fR .SH BUGS Report bugs to \fBLinux Media Mailing List <[email protected]>\fR .SH COPYRIGHT
Signature · 1 line
2.17.1