From efc9ea5b5fbffc422196e9c3a675561a1fc2bdac Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Wed, 29 May 2013 14:53:00 +0200 Subject: Removing unused var in code - remove unused var in src/haptic.c --- src/haptic.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/haptic.c b/src/haptic.c index 186a92f..35a0a59 100644 --- a/src/haptic.c +++ b/src/haptic.c @@ -114,8 +114,8 @@ int haptic_initialize() for(i=0; i<=max_device; i++){ id = device_haptic_open(_DEV[i], 0); if(id < 0) { - for (j=i; i>=0; i--){ - device_haptic_close(haptic_ids[i]); + for (j=i; j>=0; j--){ + device_haptic_close(haptic_ids[j]); } RETURN_ERR(HAPTIC_ERROR_OPERATION_FAILED); } @@ -134,13 +134,15 @@ int haptic_initialize() int haptic_deinitialize() { - int err, i; +// int err, i; + int i; if(!initialize) RETURN_ERR(HAPTIC_ERROR_NOT_INITIALIZED); for(i=0; i<=max_device; i++){ - err = device_haptic_close(haptic_ids[i]); +// err = device_haptic_close(haptic_ids[i]); + device_haptic_close(haptic_ids[i]); } initialize = 0; if(haptic_ids != NULL) -- cgit v1.2.3