The function getchar() returns an 'int' and not a 'char'. Coverity notes
that "Assigning the return value of getchar to char ... truncates its value."
and so for the most part we can resolve this easily by using 'int' as
intended, and often used throughout the codebase. A few places are not
so simple and would require further re-architecting of the code in order
to change this, so we leave them be.
Signed-off-by: Tom Rini <trini@konsulko.com>
static int read_record(char *buf, ulong len)
{
char *p;
- char c;
+ int c;
--len; /* always leave room for terminating '\0' byte */
/* k_recv receives a OS Open image file over kermit line */
static int k_recv(void)
{
- char new_char;
+ int new_char;
char k_state, k_state_saved;
int sum;
int done;
int n = 0; /* buffer index */
int plen = 0; /* prompt length */
int col; /* output column cnt */
- char c;
+ int c;
/* print prompt */
if (prompt) {