Date: Sat, 15 Oct 2016 13:45:09 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r307372 - head/usr.bin/sdiff Message-ID: <201610151345.u9FDj9pN058424@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <src.opts.mk> 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 <string.h> #include <unistd.h> -#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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610151345.u9FDj9pN058424>