Skip to content

Commit c005246

Browse files
committed
Remove trailing spaces in misc sources.
Change-Id: I573d4e816112b7401b3c824fbe773b85a8601531
1 parent d3f2c27 commit c005246

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+299
-299
lines changed

android/avd/info.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ avdInfo_newForAndroidBuild( const char* androidBuildRoot,
893893
_avdInfo_readPropertyFile(i, bootPropPath, i->bootProperties);
894894
free(bootPropPath);
895895
}
896-
896+
897897
_avdInfo_extractBuildProperties(i);
898898

899899
/* TODO: find a way to provide better information from the build files */

android/avd/util.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ propertyFile_getApiLevel(const FileData* data) {
201201
char* end = NULL;
202202
long levelLong = strtol(sdkVersion, &end, 10);
203203
int level = (int)levelLong;
204-
if (levelLong == LONG_MIN || levelLong == LONG_MAX ||
204+
if (levelLong == LONG_MIN || levelLong == LONG_MAX ||
205205
levelLong < 0 || !end || *end || level != levelLong) {
206206
level = kMinLevel;
207207
D("Invalid SDK version build property: '%s'", sdkVersion);
@@ -224,7 +224,7 @@ propertyFile_getAdbdCommunicationMode(const FileData* data) {
224224
// No ro.adb.qemud means 'legacy' ADBD.
225225
return 0;
226226
}
227-
227+
228228
char* end;
229229
long val = strtol(prop, &end, 10);
230230
if (end == NULL || *end != '\0' || val != (int)val) {

android/avd/util.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ char* propertyFile_getTargetAbi(const FileData* data);
5555

5656
/* Retrieves a string corresponding to the target architecture
5757
* extracted from a build properties file.
58-
*
58+
*
5959
* |data| is a FileData instance holding the build.prop contents.
6060
* Returns a new string that must be freed by the caller, which can
6161
* be 'arm', 'x86, 'mips', etc..., or NULL if if cannot be determined.

android/base/EintrWrapper_unittest.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ namespace base {
2929
using namespace ::android::base::testing;
3030

3131
class EintrWrapperTest : public ::testing::Test, LogOutput {
32-
public:
33-
EintrWrapperTest() :
32+
public:
33+
EintrWrapperTest() :
3434
mFatal(false),
3535
mLogged(true),
3636
mPrevious(LogOutput::setNewOutput(this)) {}
37-
37+
3838
~EintrWrapperTest() {
3939
LogOutput::setNewOutput(mPrevious);
4040
}
@@ -47,15 +47,15 @@ class EintrWrapperTest : public ::testing::Test, LogOutput {
4747
if (mFatal)
4848
longjmp(mJumper, 1);
4949
}
50-
50+
5151
protected:
5252
bool mFatal;
5353
bool mLogged;
5454
LogOutput* mPrevious;
5555
jmp_buf mJumper;
5656
};
5757

58-
58+
5959
// Loop counter used by several functions below.
6060
static int gLoopCount = 0;
6161

android/base/Log.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void defaultLogMessage(const LogParams& params,
5656
// easier. On the other hand, it means lots of logging will impact
5757
// performance.
5858
fflush(stderr);
59-
59+
6060
if (params.severity >= LOG_FATAL)
6161
exit(1);
6262
}
@@ -72,8 +72,8 @@ void logMessage(const LogParams& params,
7272
}
7373

7474
} // namespace
75-
76-
// DCHECK level.
75+
76+
// DCHECK level.
7777

7878
bool dcheckIsEnabled() {
7979
return gDcheckLevel;
@@ -90,7 +90,7 @@ bool setDcheckLevel(bool enabled) {
9090
LogSeverity getMinLogLevel() {
9191
return 0;
9292
}
93-
93+
9494
// LogString
9595

9696
LogString::LogString(const char* fmt, ...) : mString(NULL) {

android/base/Log.h

+12-12
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ LogSeverity getMinLogLevel();
6565
// This means LOG(severity) should expand to something that can take
6666
// << operators on its right hand side. This is achieved with the
6767
// ternary '? :', as implemented by this helper macro.
68-
//
68+
//
6969
// Unfortunately, a simple thing like:
7070
//
7171
// !(condition) ? (void)0 : (expr)
@@ -93,7 +93,7 @@ LogSeverity getMinLogLevel();
9393
#define LOG(severity) \
9494
LOG_LAZY_EVAL(LOG_IS_ON(severity), \
9595
LOG_MESSAGE_STREAM_COMPACT(severity))
96-
96+
9797
// A variant of LOG() that only performs logging if a specific condition
9898
// is encountered. Note that |condition| is only evaluated if |severity|
9999
// is high enough. Usage example:
@@ -124,7 +124,7 @@ LogSeverity getMinLogLevel();
124124
#define PLOG_IF(severity, condition) \
125125
LOG_LAZY_EVAL(LOG_IS_ON(severity) && (condition), \
126126
PLOG_MESSAGE_STREAM_COMPACT(severity))
127-
127+
128128
// Evaluate |condition|, and if it fails, log a fatal message.
129129
// This is a better version of assert(), in the future, this will
130130
// also break directly into the debugger for debug builds.
@@ -166,7 +166,7 @@ LogSeverity getMinLogLevel();
166166
# define ENABLE_DCHECK 2
167167
# endif
168168
#endif
169-
169+
170170
// DLOG_IS_ON(severity) is used to indicate whether DLOG() should print
171171
// something for the current level.
172172
#if ENABLE_DLOG
@@ -176,7 +176,7 @@ LogSeverity getMinLogLevel();
176176
// not compiled in the final binary.
177177
# define DLOG_IS_ON(severity) false
178178
#endif
179-
179+
180180
// DCHECK_IS_ON() is used to indicate whether DCHECK() should do anything.
181181
#if ENABLE_DCHECK == 0
182182
// NOTE: Compile-time constant ensures the DCHECK() statements are
@@ -212,7 +212,7 @@ bool setDcheckLevel(bool enabled);
212212
#define DCHECK(condition) \
213213
LOG_IF(FATAL, DCHECK_IS_ON() && !(condition)) \
214214
<< "Check failed: " #condition ". "
215-
215+
216216
// Convenience class used hold a formatted string for logging reasons.
217217
// Usage example:
218218
//
@@ -251,7 +251,7 @@ class LogStream {
251251
public:
252252
LogStream(const char* file, int lineno, LogSeverity severity);
253253
~LogStream();
254-
254+
255255
inline LogStream& operator<<(const char* str) {
256256
append(str);
257257
return *this;
@@ -275,7 +275,7 @@ class LogStream {
275275
LogStream& operator<<(unsigned long long v);
276276
LogStream& operator<<(float v);
277277
LogStream& operator<<(double v);
278-
278+
279279
const char* string() const { return mString ? mString : ""; }
280280
size_t size() const { return mSize; }
281281
const LogParams& params() const { return mParams; }
@@ -347,7 +347,7 @@ class ErrnoLogMessage {
347347
LogSeverity severity,
348348
int errnoCode);
349349
~ErrnoLogMessage();
350-
350+
351351
LogStream& stream() const { return *mStream; }
352352
private:
353353
LogStream* mStream;
@@ -370,10 +370,10 @@ namespace testing {
370370
// Abstract interface to the output where the log messages are sent.
371371
// IMPORTANT: Only use this for unit testing the log facility.
372372
class LogOutput {
373-
public:
373+
public:
374374
LogOutput() {}
375375
virtual ~LogOutput() {}
376-
376+
377377
// Send a full log message to the output. Not zero terminated, and
378378
// Does not have a trailing \n which can be added by the implementation
379379
// when writing the message to a file.
@@ -382,7 +382,7 @@ class LogOutput {
382382
virtual void logMessage(const LogParams& params,
383383
const char* message,
384384
size_t message_len) = 0;
385-
385+
386386
// Set a new log output, and return pointer to the previous
387387
// implementation, which will be NULL for the default one.
388388
// |newOutput| is either NULL (which means the default), or a

android/base/Log_unittest.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ namespace base {
2222

2323
// Create a severity level which is guaranteed to never generate a log
2424
// message. See LogOnlyEvaluatesArgumentsIfNeeded for usage.
25-
const LogSeverity LOG_INVISIBLE = -10000;
26-
25+
const LogSeverity LOG_INVISIBLE = -10000;
26+
2727
class LogTest : public ::testing::Test, android::base::testing::LogOutput {
2828
public:
2929
LogTest() : mFatal(false) {
@@ -32,7 +32,7 @@ class LogTest : public ::testing::Test, android::base::testing::LogOutput {
3232
mBuffer[0] = '\x7f';
3333
mBuffer[1] = '\0';
3434
}
35-
35+
3636
~LogTest() {
3737
::android::base::testing::LogOutput::setNewOutput(mSavedOutput);
3838
}
@@ -70,12 +70,12 @@ class CheckTest : public LogTest {
7070

7171
#if ENABLE_DCHECK != 0
7272
class DCheckEnabledTest : public LogTest {
73-
public:
73+
public:
7474
DCheckEnabledTest() : LogTest() {
7575
// Ensure DCHECKS() always run.
7676
mSavedLevel = setDcheckLevel(true);
7777
}
78-
78+
7979
~DCheckEnabledTest() {
8080
setDcheckLevel(mSavedLevel);
8181
}
@@ -90,7 +90,7 @@ class DCheckDisabledTest : public LogTest {
9090
DCheckDisabledTest() : LogTest() {
9191
mSavedLevel = setDcheckLevel(false);
9292
}
93-
93+
9494
~DCheckDisabledTest() {
9595
setDcheckLevel(mSavedLevel);
9696
}
@@ -117,15 +117,15 @@ class PLogTest : public LogTest {
117117
snprintf(mExpected,
118118
sizeof(mExpected),
119119
"%sError message: %s",
120-
suffix,
120+
suffix,
121121
strerror(errnoCode));
122122
}
123123

124124
void logMessage(const LogParams& params,
125125
const char* message,
126126
size_t messageLen) {
127127
LogTest::logMessage(params, message, messageLen);
128-
128+
129129
if (mForcedErrno != -1000)
130130
errno = mForcedErrno;
131131
}

android/base/StringView.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class StringView {
6868
mString(other.data()), mSize(other.size()) {}
6969

7070
// IMPORTANT: This is intentionally not 'explicit'.
71-
StringView(const char* string) :
71+
StringView(const char* string) :
7272
mString(string), mSize(strlen(string)) {}
7373

7474
explicit StringView(const String& str);

android/base/StringView_unittest.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ TEST(StringView, InitEmpty) {
2020
StringView view;
2121
EXPECT_TRUE(view.empty());
2222
}
23-
23+
2424
TEST(StringView, InitWithCString) {
2525
static const char kString[] = "Hello";
2626
StringView view(kString);
@@ -91,9 +91,9 @@ TEST(StringView, Iterators) {
9191
StringView view(kString);
9292
EXPECT_EQ(kString, view.begin());
9393
EXPECT_EQ(kString + kStringLen, view.end());
94-
94+
9595
size_t n = 0;
96-
for (StringView::const_iterator it = view.begin();
96+
for (StringView::const_iterator it = view.begin();
9797
it != view.end(); ++it, ++n) {
9898
EXPECT_EQ(kString[n], *it);
9999
}
@@ -110,15 +110,15 @@ TEST(StringView, ComparisonOperators) {
110110
EXPECT_TRUE(view1 >= view2);
111111
EXPECT_FALSE(view1 < view2);
112112
EXPECT_FALSE(view1 > view2);
113-
113+
114114
StringView view3("hell"); // Shorter, but first char is larger.
115115
EXPECT_FALSE(view1 == view3);
116116
EXPECT_TRUE(view1 != view3);
117117
EXPECT_TRUE(view1 < view3);
118118
EXPECT_TRUE(view1 <= view3);
119119
EXPECT_FALSE(view1 > view3);
120120
EXPECT_FALSE(view1 >= view3);
121-
121+
122122
StringView view4("Hell"); // Shorter, but first char is smaller.
123123
EXPECT_FALSE(view1 == view4);
124124
EXPECT_TRUE(view1 != view4);

android/base/files/PathUtils.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ size_t PathUtils::rootPrefixSize(const char* path, HostType hostType) {
4141
int ch = path[0];
4242
if ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z'))
4343
result = 2U;
44-
} else if (!strncmp(path, "\\\\.\\", 4) ||
44+
} else if (!strncmp(path, "\\\\.\\", 4) ||
4545
!strncmp(path, "\\\\?\\", 4)) {
4646
// UNC prefixes.
4747
return 4U;
@@ -134,7 +134,7 @@ String PathUtils::recompose(const StringVector& components,
134134
void PathUtils::simplifyComponents(StringVector* components) {
135135
StringVector stack;
136136
for (StringVector::const_iterator it = components->begin();
137-
it != components->end();
137+
it != components->end();
138138
++it) {
139139
if (*it == ".") {
140140
// Ignore any instance of '.' from the list.

android/base/files/PathUtils_unittest.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ TEST(PathUtils, decompose) {
172172
} kData[] = {
173173
{ "", { { NULL }, { NULL } } },
174174
{ "foo", {
175-
{ "foo", NULL },
175+
{ "foo", NULL },
176176
{ "foo", NULL } } },
177177
{ "foo/", {
178178
{ "foo", NULL },
@@ -193,7 +193,7 @@ TEST(PathUtils, decompose) {
193193
{ "C:", "foo", NULL },
194194
{ "C:/", "foo", NULL } } },
195195
{ "/foo", {
196-
{ "/", "foo", NULL },
196+
{ "/", "foo", NULL },
197197
{ "/", "foo", NULL } } },
198198
{ "\\foo", {
199199
{ "\\foo", NULL },

android/base/memory/ScopedPtr.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class ScopedPtr {
6868
// Return a reference to the scoped object. Allows one to
6969
// write (*foo).DoStuff().
7070
T& operator*() { return *mPtr; }
71-
71+
7272
// Return a pointer to the scoped object. Allows one to write
7373
// foo->DoStuff().
7474
T* operator->() { return mPtr; }

android/base/memory/ScopedPtr_unittest.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Foo {
2323
void DoIncrement() {
2424
(*mCountPtr)++;
2525
}
26-
26+
2727
~Foo() {
2828
DoIncrement();
2929
}

android/cmdline-option.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ android_parse_options( int *pargc, char** *pargv, AndroidOptions* opt )
165165
{
166166
((char**)field)[0] = *aread++;
167167
}
168-
else if (oo->var_type == OPTION_IS_LIST)
168+
else if (oo->var_type == OPTION_IS_LIST)
169169
{
170170
ParamList** head = (ParamList**)field;
171171
ParamList* pl;

android/config/check-esd.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ESD_SYMBOLS
3838
#undef ESD_FUNCTION
3939
static void* esd_lib;
4040

41-
int main( void )
41+
int main( void )
4242
{
4343
int fd;
4444

android/config/check-pulseaudio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ PULSEAUDIO_SYMBOLS
3939
#undef PULSEAUDIO_FUNCTION
4040
static void* pa_lib;
4141

42-
int main( void )
42+
int main( void )
4343
{
4444
int fd;
4545

0 commit comments

Comments
 (0)