From e8c987a7543641ce17c7b46424b150b008077c87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Fillod=2C=20F8CFE?= Date: Mon, 14 Jun 2004 20:57:34 +0000 Subject: [PATCH] safer this way, keep in mind value_t is a union git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1758 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- kenwood/ts850.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kenwood/ts850.c b/kenwood/ts850.c index 76137c093..9807205ff 100644 --- a/kenwood/ts850.c +++ b/kenwood/ts850.c @@ -2,7 +2,7 @@ * Hamlib Kenwood backend - TS850 description * Copyright (c) 2000-2003 by Stephane Fillod * - * $Id: ts850.c,v 1.16 2004-06-14 19:32:26 f4dwv Exp $ + * $Id: ts850.c,v 1.17 2004-06-14 20:57:34 fillods Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -505,7 +505,7 @@ int ts850_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) int ts850_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { unsigned char lvlbuf[50]; - int lvl_len, retval; + int i, lvl_len, retval; if(vfo!=RIG_VFO_CURR) return -RIG_EINVAL; @@ -534,11 +534,11 @@ int ts850_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return retval; lvlbuf[7]='\0'; - val->i=atoi(&lvlbuf[3]); - if(val->i == 30) + i=atoi(&lvlbuf[3]); + if(i == 30) val->f = 150.0; /* infinity :-) */ else - val->f = 60.0/(30.0-(float)val->i)-1.0; + val->f = 60.0/(30.0-(float)i)-1.0; break; case RIG_LEVEL_COMP: lvl_len = 0;