From 3b461c20adee376a97696262978318a5bc813a46 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 30 Jun 2011 04:11:20 +0000 Subject: [PATCH] cable: fix param count checking with parallel port cables after the refactoring git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1937 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- urjtag/ChangeLog | 5 +++++ urjtag/src/tap/chain.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index 666d6738..247d170c 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -1,3 +1,8 @@ +2011-06-30 Mike Frysinger + + * src/tap/chain.c (urj_tap_chain_connect): Fix param count check with parallel + cables after the refactorizing into dedicated funcs. Fix by Steve Tell. + 2011-06-29 Mike Frysinger * src/tap/cable.c (urj_tap_cable_wait): Tweak code style to silence warnings diff --git a/urjtag/src/tap/chain.c b/urjtag/src/tap/chain.c index ef55ddd4..9ae1f593 100644 --- a/urjtag/src/tap/chain.c +++ b/urjtag/src/tap/chain.c @@ -101,10 +101,10 @@ urj_tap_chain_connect (urj_chain_t *chain, const char *drivername, char *params[ if (driver->device_type == URJ_CABLE_DEVICE_PARPORT) { - if (paramc < 3) + if (paramc < 1) { urj_error_set (URJ_ERROR_SYNTAX, - "parallel cable requires >= 3 parameters"); + "parallel cable requires >= 2 parameters, got %d", paramc); return URJ_STATUS_FAIL; } for (j = 0; j < URJ_CABLE_PARPORT_N_DEVS; j++)