summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-06-28 16:29:06 +0200
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2021-06-29 22:57:52 +0430
commit65b2d3add37a21dda8472bb6ee0c08f591b7914a (patch)
tree2b72e5f5b7c05f3ae27098885e05b97ccb3a04d5
parent754ddda38abe580fb91d1a05a5c07e848d38845b (diff)
downloadserenity-65b2d3add37a21dda8472bb6ee0c08f591b7914a.zip
Shell: Don't do null check on `NonnullRefPtr<T>`
This will cause a problem when `NonnullRefPtr<T>::operator T*` will be declared as RETURNS_NONNULL. Clang emits a warning for this pointless null check, which breaks CI.
-rw-r--r--Userland/Shell/AST.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Shell/AST.cpp b/Userland/Shell/AST.cpp
index 78a40cc31c..e8fc60246b 100644
--- a/Userland/Shell/AST.cpp
+++ b/Userland/Shell/AST.cpp
@@ -1775,7 +1775,7 @@ RefPtr<Value> IfCond::run(RefPtr<Shell> shell)
{
auto cond = m_condition->run(shell)->resolve_without_cast(shell);
// The condition could be a builtin, in which case it has already run and exited.
- if (cond && cond->is_job()) {
+ if (cond->is_job()) {
auto cond_job_value = static_cast<const JobValue*>(cond.ptr());
auto cond_job = cond_job_value->job();