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

Commit 867189f8 authored by Mathias Agopian's avatar Mathias Agopian Committed by Android Git Automerger
Browse files

am 4cb33847: Merge "libutils cleanup" into jb-mr1-dev

* commit '4cb33847':
  libutils cleanup
parents 4d3190a8 4cb33847
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -98,6 +98,24 @@ namespace {

        return path;
    }

    /*
     * Like strdup(), but uses C++ "new" operator instead of malloc.
     */
    static char* strdupNew(const char* str)
    {
        char* newStr;
        int len;

        if (str == NULL)
            return NULL;

        len = strlen(str);
        newStr = new char[len+1];
        memcpy(newStr, str, len+1);

        return newStr;
    }
}

/*