TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

30 点作者 dennis_moore超过 3 年前

8 条评论

codingkev超过 3 年前
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 未加载
lapetitejort超过 3 年前
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_moore超过 3 年前
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 未加载
boricj超过 3 年前
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.
dgellow超过 3 年前
<p><pre><code> &#x2F;* * Samma på svenska.. *&#x2F;</code></pre>
评论 #30278868 未加载
turdnagel超过 3 年前
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 未加载
flerchin超过 3 年前
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 未加载
flerchin超过 3 年前
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 未加载