TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

This needs some heavy checking... (line 1029)

30 pointsby dennis_mooreover 3 years ago

8 comments

codingkevover 3 years ago
You can link directly to a line by appending #&lt;line_number&gt;<p><a href="https:&#x2F;&#x2F;github.com&#x2F;torvalds&#x2F;linux&#x2F;blob&#x2F;f4bc5bbb5fef3cf421ba3485d6d383c27ec473ed&#x2F;kernel&#x2F;sys.c#L1029" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;torvalds&#x2F;linux&#x2F;blob&#x2F;f4bc5bbb5fef3cf421ba3...</a>
评论 #30278849 未加载
评论 #30278935 未加载
评论 #30278770 未加载
评论 #30282950 未加载
lapetitejortover 3 years ago
I spied a goto. Ctrl&#x2F;Command+F spies 60 gotos. CS students: point to the Linux source code if your professor ever gives you grief about gotos.
评论 #30278774 未加载
评论 #30278899 未加载
评论 #30278930 未加载
评论 #30278894 未加载
评论 #30278969 未加载
评论 #30279696 未加载
评论 #30279628 未加载
dennis_mooreover 3 years ago
I find it mildly entertaining to casually browse random 17-year-old code lying at the heart of the Linux kernel and encounter gems like this.
评论 #30278487 未加载
评论 #30278746 未加载
评论 #30278363 未加载
boricjover 3 years ago
As someone who has done some OS development and sysadmin work, I can relate to that quote. The 1st edition of Unix is over 50 years old and some of the legacy cruft that has accumulated since is so sedimented I swear it&#x27;s going to turn into oil any minute now.
dgellowover 3 years ago
<p><pre><code> &#x2F;* * Samma på svenska.. *&#x2F;</code></pre>
评论 #30278868 未加载
turdnagelover 3 years ago
A meta comment on the comments on this article: as one might expect post-&quot;goto fail&quot;[1] there are a lot of people saying &quot;hey this should be refactored, no goto!&quot; I thought that at first when looking at the code, given what I remember of the Apple SSL vulnerability, and how &quot;goto&quot; has a smell. But, as it turns out, there are sane reasons to use goto in systems programming, especially as a kind of cleanup &#x2F; finally block. TIL.<p>[1] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7282005" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7282005</a>
评论 #30279149 未加载
flerchinover 3 years ago
In a modern codebase, would there be tests for code like this? Is it too late for a plucky contributor to start adding them?
评论 #30278873 未加载
flerchinover 3 years ago
I guess it&#x27;s too scary to touch, but I feel like such code could be refactored to not use goto, amongst other issues.
评论 #30278706 未加载
评论 #30278742 未加载
评论 #30278879 未加载
评论 #30278904 未加载
评论 #30279074 未加载
评论 #30278733 未加载
评论 #30278842 未加载