Consistent use of menuq_add for ssh menu.

This commit is contained in:
okan 2016-12-06 21:09:22 +00:00
parent 642c4932c1
commit dd468cc47d

View File

@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
* *
* $OpenBSD: kbfunc.c,v 1.140 2016/12/01 20:28:19 okan Exp $ * $OpenBSD: kbfunc.c,v 1.141 2016/12/06 21:09:22 okan Exp $
*/ */
#include <sys/types.h> #include <sys/types.h>
@ -520,7 +520,7 @@ kbfunc_menu_ssh(void *ctx, union arg *arg, enum xev xev)
if (p - buf + 1 > sizeof(hostbuf)) if (p - buf + 1 > sizeof(hostbuf))
continue; continue;
(void)strlcpy(hostbuf, buf, p - buf + 1); (void)strlcpy(hostbuf, buf, p - buf + 1);
menuq_add(&menuq, NULL, hostbuf); menuq_add(&menuq, NULL, "%s", hostbuf);
} }
free(lbuf); free(lbuf);
(void)fclose(fp); (void)fclose(fp);