drm_hwcomposer: Fix property_get() linux impl.
Bad implementation was found during code surfing.
At this moment function is used only as a stub for CI.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
diff --git a/utils/properties.h b/utils/properties.h
index 8d883eb..c8ddbae 100644
--- a/utils/properties.h
+++ b/utils/properties.h
@@ -18,9 +18,8 @@
auto inline property_get(const char *name, char *value,
const char *default_value) -> int {
char *prop = std::getenv(name);
- if (prop == nullptr) {
- snprintf(value, PROPERTY_VALUE_MAX, "%s", default_value);
- }
+ snprintf(value, PROPERTY_VALUE_MAX, "%s",
+ (prop == nullptr) ? default_value : prop);
return static_cast<int>(strlen(value));
}