From owner-svn-src-all@freebsd.org Sat Oct 15 13:45:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10D9DC1257C; Sat, 15 Oct 2016 13:45:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D47D2166; Sat, 15 Oct 2016 13:45:10 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9FDjAN4058426; Sat, 15 Oct 2016 13:45:10 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9FDj9pN058424; Sat, 15 Oct 2016 13:45:09 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201610151345.u9FDj9pN058424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 15 Oct 2016 13:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r307372 - head/usr.bin/sdiff X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Oct 2016 13:45:11 -0000 Author: bapt Date: Sat Oct 15 13:45:09 2016 New Revision: 307372 URL: https://svnweb.freebsd.org/changeset/base/307372 Log: Move cleanup() into the edit.c file which is the only users of that function Remove common.{c,h} Deleted: head/usr.bin/sdiff/common.c head/usr.bin/sdiff/common.h Modified: head/usr.bin/sdiff/Makefile head/usr.bin/sdiff/edit.c Modified: head/usr.bin/sdiff/Makefile ============================================================================== --- head/usr.bin/sdiff/Makefile Sat Oct 15 13:44:13 2016 (r307371) +++ head/usr.bin/sdiff/Makefile Sat Oct 15 13:45:09 2016 (r307372) @@ -3,7 +3,7 @@ .include PROG= sdiff -SRCS= common.c edit.c sdiff.c +SRCS= edit.c sdiff.c WARNS= 3 MAN1= sdiff.1 Modified: head/usr.bin/sdiff/edit.c ============================================================================== --- head/usr.bin/sdiff/edit.c Sat Oct 15 13:44:13 2016 (r307371) +++ head/usr.bin/sdiff/edit.c Sat Oct 15 13:45:09 2016 (r307372) @@ -21,9 +21,17 @@ __FBSDID("$FreeBSD$"); #include #include -#include "common.h" #include "extern.h" +static void +cleanup(const char *filename) +{ + + if (unlink(filename)) + err(2, "could not delete: %s", filename); + exit(2); +} + /* * Execute an editor on the specified pathname, which is interpreted * from the shell. This means flags may be included.