Use assignment rather than comparison.

This commit is contained in:
Stefan Farfeleder 2005-08-13 15:00:54 +00:00
parent a9b7d0260b
commit 8d99957008
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149024

View File

@ -1600,7 +1600,7 @@ getprompt(void *unused __unused)
*/
case 'h':
case 'H':
ps[i] == '\0';
ps[i] = '\0';
gethostname(&ps[i], PROMPTLEN - i);
/* Skip to end of hostname. */
trim = (*fmt == 'h') ? '.' : '\0';
@ -1616,7 +1616,7 @@ getprompt(void *unused __unused)
*/
case 'W':
case 'w':
ps[i] == '\0';
ps[i] = '\0';
getcwd(&ps[i], PROMPTLEN - i);
if (*fmt == 'W') {
/* Final path component only. */