1 obex_test_cable.c: avoid to use SuSv3 LEGACY APIs
3 Signed-off-by: Julien Boibessot <julien.boibessot@armadeus.com>
4 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
6 Index: openobex-1.5/apps/obex_test_cable.c
7 ===================================================================
8 --- openobex-1.5.orig/apps/obex_test_cable.c 2009-02-08 19:30:22.000000000 +0100
9 +++ openobex-1.5/apps/obex_test_cable.c 2010-06-16 11:11:05.000000000 +0200
11 if(total == sizeof(tmpbuf))
14 - if( (answer = index(tmpbuf, '\n')) ) {
15 + if( (answer = strchr(tmpbuf, '\n')) ) {
16 // Remove first line (echo)
17 - if( (answer_end = index(answer+1, '\n')) ) {
18 + if( (answer_end = strchr(answer+1, '\n')) ) {
19 // Found end of answer
25 tcgetattr(gt->ttyfd, >->oldtio);
26 - bzero(>->newtio, sizeof(struct termios));
27 + memset(>->newtio, 0, sizeof(struct termios));
28 gt->newtio.c_cflag = B115200 | CS8 | CREAD | CRTSCTS;
29 gt->newtio.c_iflag = IGNPAR;
30 gt->newtio.c_oflag = 0;