OSDN Git Service

Address const/non-const issues in preparation for libcxx rebase
authorDan Austin <danielaustin@google.com>
Tue, 31 May 2016 20:27:03 +0000 (13:27 -0700)
committerDan Austin <danielaustin@google.com>
Thu, 9 Jun 2016 06:24:16 +0000 (06:24 +0000)
Change-Id: I7ab9f65b41cbd2a8272810427529f46c6fbf2a0d
(cherry picked from commit 09a7987fb59ed6843d51acf0161d66ed3eb2252f)
(cherry picked from commit d1a8fe69ec033b59b56c171ac5fa9d90b886a8c5)

cmds/atrace/atrace.cpp

index 487c6c8..b7208d3 100644 (file)
@@ -533,11 +533,11 @@ static void clearAppProperties()
 
 // Set the system property that indicates which apps should perform
 // application-level tracing.
-static bool setAppCmdlineProperty(const char* cmdline)
+static bool setAppCmdlineProperty(char* cmdline)
 {
     char buf[PROPERTY_KEY_MAX];
     int i = 0;
-    const char* start = cmdline;
+    char* start = cmdline;
     while (start != NULL) {
         if (i == MAX_PACKAGES) {
             fprintf(stderr, "error: only 16 packages could be traced at once\n");
@@ -743,7 +743,7 @@ static bool setUpTrace()
         }
         packageList += value;
     }
-    ok &= setAppCmdlineProperty(packageList.data());
+    ok &= setAppCmdlineProperty(&packageList[0]);
     ok &= pokeBinderServices();
 
     // Disable all the sysfs enables.  This is done as a separate loop from