Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Jun 2010 08:50:39 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r208821 - head/bin/cp
Message-ID:  <201006050850.o558odbn069364@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Sat Jun  5 08:50:39 2010
New Revision: 208821
URL: http://svn.freebsd.org/changeset/base/208821

Log:
  Don't try to copy a socket after "xxx is a socket (not copied)." message.
  Previously, it would either try to copy it anyway and fail (without -R),
  or create fifo instead of the socket (with -R).
  
  Found with:	Coverity Prevent
  CID:		5623
  MFC after:	2 weeks

Modified:
  head/bin/cp/cp.c

Modified: head/bin/cp/cp.c
==============================================================================
--- head/bin/cp/cp.c	Sat Jun  5 08:44:40 2010	(r208820)
+++ head/bin/cp/cp.c	Sat Jun  5 08:50:39 2010	(r208821)
@@ -466,6 +466,7 @@ copy(char *argv[], enum op type, int fts
 		case S_IFSOCK:
 			warnx("%s is a socket (not copied).",
 				    curr->fts_path);
+			break;
 		case S_IFIFO:
 			if (Rflag) {
 				if (copy_fifo(curr->fts_statp, !dne))



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