LWN.net Logo

Maybe SCO had a point

Maybe SCO had a point

Posted Aug 22, 2003 2:33 UTC (Fri) by rfunk (subscriber, #4054)
Parent article: Maybe SCO had a point

I think Eric's diff makes things quite unclear.

You can use "patch -lR" to reconstruct the SysV code from his diff and the Linux code. Then do a "diff -wU 4" between the two, and you'll get a full and clear listing of the similarities and differences. You might also want to do the "diff -wU 4" between the 32V and Linux code.

In order for the Linux code to be derived from the SysV code, the Linux person at SGI would have moved an ASSERT(size > 0) to be before an "if (size == 0) return NULL", AND change it to ASSERT(size >= 0), so that the "if clause" is useless. This is the best case for the Linux code not to have come from SysV, and it can easily be chalked up to incompetence on the part of the SGI programmer.

After doing both unified diffs (32v-Linux and SysV-Linux) I'm afraid I'm leaning toward Jon's conclusion rather than Eric's.


(Log in to post comments)

Maybe SCO had a point

Posted Aug 22, 2003 5:10 UTC (Fri) by ekonijn (subscriber, #6395) [Link]

In both cases, the assert protects against negative values
of size; nothing wrong there. The if statement is not quite useless,
it's the difference between an oops and a running system.

Maybe SCO had a point

Posted Aug 22, 2003 5:23 UTC (Fri) by rfunk (subscriber, #4054) [Link]

Sorry, I was looking at the ASSERT backwards.

I still agree with Jon Corbet's though; the Linux code is closer to the SysV code than to the 32V code.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds