summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
Diffstat (limited to 'AK')
-rw-r--r--AK/Try.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/AK/Try.h b/AK/Try.h
index 862fc7dbc5..4efb21a5a0 100644
--- a/AK/Try.h
+++ b/AK/Try.h
@@ -9,10 +9,10 @@
// NOTE: This macro works with any result type that has the expected APIs.
// It's designed with AK::Result and Kernel::KResult in mind.
-#define TRY(expression) \
- ({ \
- auto result = (expression); \
- if (result.is_error()) \
- return result.release_error(); \
- result.release_value(); \
+#define TRY(expression) \
+ ({ \
+ auto _temporary_result = (expression); \
+ if (_temporary_result.is_error()) \
+ return _temporary_result.release_error(); \
+ _temporary_result.release_value(); \
})