<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">obex_test_cable.c: avoid to use SuSv3 LEGACY APIs

Signed-off-by: Julien Boibessot &lt;julien.boibessot@armadeus.com&gt;
Signed-off-by: Samuel Martin &lt;s.martin49@gmail.com&gt;

Index: openobex-1.5/apps/obex_test_cable.c
===================================================================
--- openobex-1.5.orig/apps/obex_test_cable.c	2009-02-08 19:30:22.000000000 +0100
+++ openobex-1.5/apps/obex_test_cable.c	2010-06-16 11:11:05.000000000 +0200
@@ -113,9 +113,9 @@
 			if(total == sizeof(tmpbuf))
 				return -1;
 
-			if( (answer = index(tmpbuf, '\n')) )	{
+			if( (answer = strchr(tmpbuf, '\n')) )	{
 				// Remove first line (echo)
-				if( (answer_end = index(answer+1, '\n')) )	{
+				if( (answer_end = strchr(answer+1, '\n')) )	{
 					// Found end of answer
 					done = 1;
 				}
@@ -178,7 +178,7 @@
 	}
 
 	tcgetattr(gt-&gt;ttyfd, &amp;gt-&gt;oldtio);
-	bzero(&amp;gt-&gt;newtio, sizeof(struct termios));
+	memset(&amp;gt-&gt;newtio, 0, sizeof(struct termios));
 	gt-&gt;newtio.c_cflag = B115200 | CS8 | CREAD | CRTSCTS;
 	gt-&gt;newtio.c_iflag = IGNPAR;
 	gt-&gt;newtio.c_oflag = 0;
</pre></body></html>