Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c73e76b5 authored by Myles Watson's avatar Myles Watson
Browse files

osi: Return 0 on osi_property_get failure

Test: mma -j32
Change-Id: Ia1aae4cd5618816b529449844b3a0724e4eb3200
parent 84a1389d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
// PROPERTY_VALUE_MAX - 1 and will always be zero terminated.
// (the length does not include the terminating zero).
// If the property read fails or returns an empty value, the |default_value|
// is used (if nonnull).
// is used (if nonnull).  If the |default_value| is null, zero is returned.
int osi_property_get(const char* key, char* value, const char* default_value);

// Write value of property associated with key |key| to |value|.
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@
int osi_property_get(const char* key, char* value, const char* default_value) {
#if defined(OS_GENERIC)
  /* For linux right now just return default value, if present */
  int len = -1;
  int len = 0;
  if (!default_value) return len;

  len = strlen(default_value);