Date: Sun, 19 Aug 2012 00:06:13 +0000 From: jhagewood@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r240515 - soc2012/jhagewood/diff Message-ID: <20120819000613.D85D81065744@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120819000613.D85D81065744>