From 6085cd5a645f95dca9fd80ca8df9dc0c26cf5969 Mon Sep 17 00:00:00 2001 From: Tom Cherry Date: Thu, 12 Mar 2020 11:14:19 -0700 Subject: [PATCH] liblog: move LOG_ID_DEFAULT into the log_id enum As requested during the API review. Bug: 150898477 Test: liblog and libbase unit tests Change-Id: Id67203bbfbc3e116b6b6efd40428afe48203dcfc --- liblog/include/android/log.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/liblog/include/android/log.h b/liblog/include/android/log.h index 6a433e778..4ce8038df 100644 --- a/liblog/include/android/log.h +++ b/liblog/include/android/log.h @@ -155,14 +155,11 @@ typedef enum log_id { /** The kernel log buffer. */ LOG_ID_KERNEL = 7, - LOG_ID_MAX -} log_id_t; + LOG_ID_MAX, -/** - * Let the logging function choose the best log target. - * This is not part of the enum since adding either -1 or 0xFFFFFFFF forces the enum to be signed or - * unsigned, which breaks unfortunately common arithmetic against LOG_ID_MIN and LOG_ID_MAX. */ -#define LOG_ID_DEFAULT (-1) + /** Let the logging function choose the best log target. */ + LOG_ID_DEFAULT = 0x7FFFFFFF +} log_id_t; /** * Writes the constant string `text` to the log buffer `id`,