Merge "Ran clang-format on android/cdm/util files."

This commit is contained in:
Alex Dale
2019-10-04 16:23:22 +00:00
committed by Android (Google) Code Review
4 changed files with 36 additions and 19 deletions

View File

@@ -14,6 +14,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <cstring>
#include <memory>

View File

@@ -12,6 +12,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <cstring>
#include "file_store.h"

View File

@@ -24,10 +24,10 @@
#include "log.h"
#include <utils/Log.h>
#include <string>
#include <stdio.h>
#include <stdarg.h>
#include <stdio.h>
#include <string>
/*
* Uncomment the line below if you want to have the LOGV messages to print
@@ -48,8 +48,8 @@ void Log(const char* file, const char* function, int line, LogPriority level,
filename = filename == nullptr ? file : filename + 1;
char buf[LOG_BUF_SIZE];
int len = snprintf(buf, LOG_BUF_SIZE, "[%s(%d):%s] ", filename, line,
function);
int len =
snprintf(buf, LOG_BUF_SIZE, "[%s(%d):%s] ", filename, line, function);
if (len < 0) len = 0;
if (static_cast<unsigned int>(len) < sizeof(buf)) {
va_list ap;
@@ -61,15 +61,27 @@ void Log(const char* file, const char* function, int line, LogPriority level,
android_LogPriority prio = ANDROID_LOG_VERBOSE;
switch (level) {
case LOG_SILENT: return; // It is nonsensical to pass LOG_SILENT.
case LOG_ERROR: prio = ANDROID_LOG_ERROR; break;
case LOG_WARN: prio = ANDROID_LOG_WARN; break;
case LOG_INFO: prio = ANDROID_LOG_INFO; break;
case LOG_DEBUG: prio = ANDROID_LOG_DEBUG; break;
case LOG_SILENT:
return; // It is nonsensical to pass LOG_SILENT.
case LOG_ERROR:
prio = ANDROID_LOG_ERROR;
break;
case LOG_WARN:
prio = ANDROID_LOG_WARN;
break;
case LOG_INFO:
prio = ANDROID_LOG_INFO;
break;
case LOG_DEBUG:
prio = ANDROID_LOG_DEBUG;
break;
#if LOG_NDEBUG
case LOG_VERBOSE: return;
case LOG_VERBOSE:
return;
#else
case LOG_VERBOSE: prio = ANDROID_LOG_VERBOSE; break;
case LOG_VERBOSE:
prio = ANDROID_LOG_VERBOSE;
break;
#endif
}

View File

@@ -1,9 +1,12 @@
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
// source code may only be used and distributed under the Widevine Master
// License Agreement.
#include "file_utils.h"
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "file_store.h"
#include "test_vectors.h"