[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Gotos
Could someone please explain to me why we have a bunch
of gotos where they really could be removed? I'm sure
there is a good reason, but I simply don't see it. For
example, why shouldn't the following patch be applied?
I'd appreciate any explanation I could get. Thank you.
Tim
--- linux-2.6.0-test11/fs/direct-io.ORG 2004-01-08 12:41:15.768929496 +0100
+++ linux-2.6.0-test11/fs/direct-io.c 2004-01-08 12:45:20.811677336 +0100
@@ -163,7 +163,7 @@
dio->head = 0;
dio->tail = 1;
ret = 0;
- goto out;
+ return ret;
}
if (ret >= 0) {
@@ -173,7 +173,7 @@
dio->tail = ret;
ret = 0;
}
-out:
+
return ret;
}
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/