--- libaitcli/src/telnet.c 2017/01/22 17:59:51 1.4.22.1 +++ libaitcli/src/telnet.c 2017/10/08 23:10:30 1.4.22.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: telnet.c,v 1.4.22.1 2017/01/22 17:59:51 misho Exp $ +* $Id: telnet.c,v 1.4.22.2 2017/10/08 23:10:30 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -443,7 +443,7 @@ cli_telnet_GetCmd(struct telnetAttrs *attr) * return: -1 can`t set command; !=-1 ok */ int -cli_telnet_SetCmd(struct telnetAttrs *attr, u_char cmd, u_char optz, ...) +cli_telnet_SetCmd(struct telnetAttrs *attr, u_char cmd, int optz, ...) { va_list lst; u_char res; @@ -464,7 +464,7 @@ cli_telnet_SetCmd(struct telnetAttrs *attr, u_char cmd cli_SetErr(EINVAL, "Invalid option argument!"); return -1; } else - attr->ta_opt = optz; + attr->ta_opt = (u_char) optz; } if (SB == attr->ta_cmd) { va_start(lst, optz);