Keep escape sequences as static variables
This commit is contained in:
parent
83f07d9465
commit
b44a6789a8
1 changed files with 3 additions and 3 deletions
|
@ -278,12 +278,12 @@ static inline ssize_t write_command(int fd, int command, int port) {
|
|||
return write_byte(fd, ((port & 0x0f) << 4) | (command & 0x0f));
|
||||
}
|
||||
|
||||
static unsigned char escape_fend[2] = { PATTY_KISS_FESC, PATTY_KISS_TFEND };
|
||||
static unsigned char escape_fesc[2] = { PATTY_KISS_FESC, PATTY_KISS_TFESC };
|
||||
|
||||
ssize_t patty_kiss_tnc_send(patty_kiss_tnc *tnc, const void *buf, size_t len, int port) {
|
||||
size_t i, start = 0, end = 0;
|
||||
|
||||
unsigned char escape_fend[2] = { PATTY_KISS_FESC, PATTY_KISS_TFEND };
|
||||
unsigned char escape_fesc[2] = { PATTY_KISS_FESC, PATTY_KISS_TFESC };
|
||||
|
||||
if (write_byte(tnc->fd, PATTY_KISS_FEND) < 0) {
|
||||
goto error_io;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue