From owner-svn-soc-all@FreeBSD.ORG Sun Aug 19 00:06:16 2012 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id D85D81065744 for ; Sun, 19 Aug 2012 00:06:13 +0000 (UTC) (envelope-from jhagewood@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Sun, 19 Aug 2012 00:06:13 +0000 Date: Sun, 19 Aug 2012 00:06:13 +0000 From: jhagewood@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20120819000613.D85D81065744@hub.freebsd.org> Cc: Subject: socsvn commit: r240515 - soc2012/jhagewood/diff X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2012 00:06:16 -0000 Author: jhagewood Date: Sun Aug 19 00:06:13 2012 New Revision: 240515 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=240515 Log: completed zdiff Modified: soc2012/jhagewood/diff/diffreg.c Modified: soc2012/jhagewood/diff/diffreg.c ============================================================================== --- soc2012/jhagewood/diff/diffreg.c Sat Aug 18 23:28:34 2012 (r240514) +++ soc2012/jhagewood/diff/diffreg.c Sun Aug 19 00:06:13 2012 (r240515) @@ -339,9 +339,11 @@ f1 = stdin; else { if (filebehave == FILE_NORMAL) - f1 = fopen(file1, "r"); + if ((f1 = fopen(file1, "r")) == NULL) + err(2, "could not open %s", file1); if (filebehave == FILE_GZIP) { - f1 = decompressfile(file1, "r"); + if ((f1 = decompressfile(file1, "r")) == NULL) + err(2, "could not open %s", file1); } } } @@ -365,9 +367,11 @@ f2 = stdin; else { if (filebehave == FILE_NORMAL) - f2 = fopen(file2, "r"); + if ((f2 = fopen(file2, "r")) == NULL) + err(2, "could not open %s", file2); if (filebehave == FILE_GZIP) - f2 = decompressfile(file2, "r"); + if ((f2 = decompressfile(file2, "r")) == NULL) + err(2, "could not open %s", file2); } } if (f2 == NULL) {