forked from crdroidandroid/android_system_core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup package_string() and its users
package_string() isn't readable in its current form and a loop is unnecessary, so let's replace that with the direct calculations. The new and old functions are identical in results except an edge case where the old function incorrectly believes it needs to round up to '10' for the size prefix, when '9' would be ok, specifically: 10\naaaaa\n\f vs 9\naaaaa\n\f. This is true for all powers of 10. Clean up the calling side in logcat as well. Test: printing log statistics and prune list works Change-Id: Ib62ab2badab59040215b130ec9e3efbc7c95af3f
- Loading branch information
Tom Cherry
committed
Dec 6, 2019
1 parent
ed860ff
commit e17b4f6
Showing
2 changed files
with
48 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters