Opened 14 years ago
Closed 14 years ago
#7352 closed enhancement (invalid)
Removing goto from boot loader main.cpp
Reported by: | Finder | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | System/Boot Loader | Version: | R1/Development |
Keywords: | goto | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
This is just a little patch to remove a goto from the main.cpp of the boot loader. I made this because:
- coding guidelines
- goto is evil
- http://xkcd.com/292/
Attachments (1)
Change History (4)
by , 14 years ago
Attachment: | loadermain-nogoto.patch added |
---|
comment:1 by , 14 years ago
patch: | 0 → 1 |
---|
comment:2 by , 14 years ago
comment:3 by , 14 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
While goto should be avoided generally, using goto to bail out like this, and do proper cleanup is perfectly fine IMO, and it's actually easier to follow than your code. Thanks for your patch, anyway, though!
Just look at src/system/kernel/fs/vfs.cpp if you want to shudder a bit more :-)
Note:
See TracTickets
for help on using tickets.
Finder, you must be kidding, right?