Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!twinsun.com!coleman From: coleman@twinsun.com (Mike Coleman) Newsgroups: gnu.utils.bug Subject: exit status does not respect -B flag Message-ID: <9002030318.AA07523@spot.twinsun.com> Date: 3 Feb 90 03:18:49 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 13 GNU diff version 1.12 exits with wrong status when -B flag is used. For example, if the file a contains just newlines, diff -B a /dev/null exits with status 1, even though no differences are printed. In file analyze.c, in the function diff_2_files, an assumption is made that 'script' will be null if there are no significant differences between the two files. It is possible however that the script consists entirely of change nodes with all inserted and deleted fields equal to 0. In this case, the function should return 0.