filetable nits that, sadly, don't fix my bug

上级 992b264a
...@@ -14,7 +14,7 @@ public: ...@@ -14,7 +14,7 @@ public:
if (getfile(fd, &f)) if (getfile(fd, &f))
t->ofile_[fd].store(f->dup()); t->ofile_[fd].store(f->dup());
else else
t->ofile_[fd] = nullptr; t->ofile_[fd].store(nullptr);
} }
return t; return t;
} }
...@@ -62,7 +62,7 @@ public: ...@@ -62,7 +62,7 @@ public:
private: private:
filetable() : ref_(1) { filetable() : ref_(1) {
for(int fd = 0; fd < NOFILE; fd++) for(int fd = 0; fd < NOFILE; fd++)
ofile_[fd] = nullptr; ofile_[fd].store(nullptr);
} }
~filetable() { ~filetable() {
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论