Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror

Slashdot videos: Now with more Slashdot!

  • View

  • Discuss

  • Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

×

Comment: Re:why? (Score 1) 677

by bytesex (#49042557) Attached to: Empirical Study On How C Devs Use Goto In Practice Says "Not Harmful"

I use a standard for coding in C that *requires* the use of goto. It goes like this:

#define CHECK(fnc) { int __r = (fnc); if (__r) goto CLEANUP; }

Then define each function to have a CLEANUP: label, and surround the call of every function from within this function by CHECK(). The CLEANUP label usually has a return 0; just before it, and in most cases a return nonzero; after it. Gives you clean code that always eats up the stack in case of error.

Comment: Re:Open source code is open for everyone (Score 1) 211

by bytesex (#48921863) Attached to: Serious Network Function Vulnerability Found In Glibc

Not necessarily: to come to this point, you need two things: development quality, and auditing quality. The first to create, the second to discover, the bugs. The second is what you get plenty of, in the open source world, presumably. But you assume that an open source developer is just as good as a closed source developer. That might not necessarily be true.

ASHes to ASHes, DOS to DOS.

Working...