Since rev 1.36, the instance variable is never read again so we can
simply drop the else clause with the assignment.
While there, also drop the useless increment, as pointed out by tom@.
OK deraadt@ (previous version), millert@, tom@
-/* $OpenBSD: login.c,v 1.69 2017/12/08 17:04:15 deraadt Exp $ */
+/* $OpenBSD: login.c,v 1.70 2018/08/15 19:38:47 fcambus Exp $ */
/* $NetBSD: login.c,v 1.13 1996/05/15 23:50:16 jtc Exp $ */
/*-
if ((instance = strchr(username, '/')) != NULL) {
if (strncmp(instance + 1, "root", 4) == 0)
rootlogin = 1;
- *instance++ = '\0';
- } else
- instance = "";
+ *instance = '\0';
+ }
if (strlen(username) > UT_NAMESIZE)
username[UT_NAMESIZE] = '\0';