Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jan 2017 16:24:41 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r311288 - head/usr.bin/chat
Message-ID:  <201701041624.v04GOfUN076744@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Wed Jan  4 16:24:40 2017
New Revision: 311288
URL: https://svnweb.freebsd.org/changeset/base/311288

Log:
  Delete dead code in chat(8)
  
  It's always been dead, ever since first import in 1994.  It's still dead in
  OpenBSD's version, too.
  
  Reported by:	Coverity
  CID:		270586
  MFC after:	4 weeks
  Sponsored by:	Spectra Logic Corp

Modified:
  head/usr.bin/chat/chat.c

Modified: head/usr.bin/chat/chat.c
==============================================================================
--- head/usr.bin/chat/chat.c	Wed Jan  4 16:10:52 2017	(r311287)
+++ head/usr.bin/chat/chat.c	Wed Jan  4 16:24:40 2017	(r311288)
@@ -1173,7 +1173,7 @@ int
 get_string(char *string)
 {
     char temp[STR_LEN];
-    int c, printed = 0;
+    int c;
     size_t len, minlen;
     char *s = temp, *end = s + STR_LEN;
     char *logged = temp;
@@ -1306,13 +1306,6 @@ get_string(char *string)
 
     alarm(0);
     
-    if (verbose && printed) {
-	if (alarmed)
-	    chat_logf(" -- read timed out");
-	else
-	    chat_logf(" -- read failed: %m");
-    }
-
     exit_code = 3;
     alarmed   = 0;
     return (0);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701041624.v04GOfUN076744>