compilation fixes to ascii-xfr

Kjell M. Myksvoll kmyksvo at online.no
Tue Oct 19 21:08:02 UTC 2010


Hi,

This is in no way needed, but anyway...

The small attached patch fixes some small compilation warnings
when compiling 'ascii-xfr'.

br,
kmm




diff -b -urN orig/ascii-xfr.c new/ascii-xfr.c
--- orig/ascii-xfr.c	2010-10-19 23:04:15.874623001 +0200
+++ new/ascii-xfr.c	2010-10-19 23:05:00.304622998 +0200
@@ -19,8 +19,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <strings.h>
 #include <time.h>
+#include <termios.h>
 #include <unistd.h>
 #include <sys/time.h>
 #include <sys/types.h>
@@ -117,7 +117,7 @@
 void check_answer(void)
 { /* a patch from Bo Branten <bosse at ing.umu.se> */
   char line[1024];
-  int  n;
+  int  n, ret;
   fd_set rfds;
   struct timeval tv;
 
@@ -127,7 +127,7 @@
   tv.tv_usec = 0;
   while (select (STDIN_FILENO + 1, &rfds, NULL, NULL, &tv) > 0) {
     n = read (STDIN_FILENO, line, sizeof(line));
-    write(STDERR_FILENO, line, n);
+    ret = write(STDERR_FILENO, line, n);
     FD_ZERO (&rfds);
     FD_SET (STDIN_FILENO, &rfds);
     tv.tv_sec = 0;





More information about the minicom-devel mailing list