Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
@@ -21,10 +21,11 @@
/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2013 DEY Storage Systems, Inc.
* Copyright (c) 2014 Gary Mills
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2019 Joyent, Inc.
*/
/*
* zlogin provides three types of login which allow users in the global
* zone to access non-global zones.
@@ -610,11 +611,10 @@
static boolean_t beginning_of_line = B_TRUE;
static boolean_t local_echo = B_FALSE;
char ibuf[ZLOGIN_BUFSIZ];
int nbytes;
char *buf = ibuf;
- char c = *buf;
nbytes = read(STDIN_FILENO, ibuf, ZLOGIN_RDBUFSIZ);
if (nbytes == -1 && (errno != EINTR || dead))
return (-1);
@@ -623,11 +623,11 @@
/* 0 read means EOF, close the pipe to the child */
if (nbytes == 0)
return (1);
- for (c = *buf; nbytes > 0; c = *buf, --nbytes) {
+ for (char c = *buf; nbytes > 0; c = *buf, --nbytes) {
buf++;
if (beginning_of_line && !nocmdchar) {
beginning_of_line = B_FALSE;
if (c == cmdchar) {
local_echo = B_TRUE;