1
0
mirror of https://github.com/UzixLS/picocom.git synced 2025-07-19 07:21:18 +03:00

Const correct some pointers

This commit is contained in:
David Leonard
2018-02-07 21:38:23 +10:00
committed by Nick Patavalis
parent acc4e7ea1a
commit 399d7f9480
2 changed files with 5 additions and 4 deletions

View File

@ -130,7 +130,7 @@ const char *flow_str[] = {
/* character mapping names */
struct map_names_s {
char *name;
const char *name;
int flag;
} map_names[] = {
{ "crlf", M_CRLF },
@ -154,7 +154,8 @@ struct map_names_s {
int
parse_map (char *s)
{
char *m, *t;
const char *m;
char *t;
int f, flags, i;
flags = 0;

4
term.c
View File

@ -403,7 +403,7 @@ term_exitfunc (void)
r = tcsetattr(term.fd[i], TCSANOW, &term.origtermios[i]);
} while ( r < 0 && errno == EINTR );
if ( r < 0 ) {
char *tname;
const char *tname;
tname = ttyname(term.fd[i]);
if ( ! tname ) tname = "UNKNOWN";
@ -447,7 +447,7 @@ term_lib_init (void)
r = tcsetattr(term.fd[i], TCSANOW, &term.origtermios[i]);
} while ( r < 0 && errno == EINTR );
if ( r < 0 ) {
char *tname;
const char *tname;
tname = ttyname(term.fd[i]);
if ( ! tname ) tname = "UNKNOWN";