Remove trailing spaces in misc sources.
Change-Id: I573d4e816112b7401b3c824fbe773b85a8601531
diff --git a/android/avd/info.c b/android/avd/info.c
index f535702..405fd04 100644
--- a/android/avd/info.c
+++ b/android/avd/info.c
@@ -893,7 +893,7 @@
_avdInfo_readPropertyFile(i, bootPropPath, i->bootProperties);
free(bootPropPath);
}
-
+
_avdInfo_extractBuildProperties(i);
/* TODO: find a way to provide better information from the build files */
diff --git a/android/avd/util.c b/android/avd/util.c
index 9ccfce9..24d5f85 100644
--- a/android/avd/util.c
+++ b/android/avd/util.c
@@ -201,7 +201,7 @@
char* end = NULL;
long levelLong = strtol(sdkVersion, &end, 10);
int level = (int)levelLong;
- if (levelLong == LONG_MIN || levelLong == LONG_MAX ||
+ if (levelLong == LONG_MIN || levelLong == LONG_MAX ||
levelLong < 0 || !end || *end || level != levelLong) {
level = kMinLevel;
D("Invalid SDK version build property: '%s'", sdkVersion);
@@ -224,7 +224,7 @@
// No ro.adb.qemud means 'legacy' ADBD.
return 0;
}
-
+
char* end;
long val = strtol(prop, &end, 10);
if (end == NULL || *end != '\0' || val != (int)val) {
diff --git a/android/avd/util.h b/android/avd/util.h
index efc6439..147b10a 100644
--- a/android/avd/util.h
+++ b/android/avd/util.h
@@ -55,7 +55,7 @@
/* Retrieves a string corresponding to the target architecture
* extracted from a build properties file.
- *
+ *
* |data| is a FileData instance holding the build.prop contents.
* Returns a new string that must be freed by the caller, which can
* be 'arm', 'x86, 'mips', etc..., or NULL if if cannot be determined.
diff --git a/android/base/EintrWrapper_unittest.cpp b/android/base/EintrWrapper_unittest.cpp
index ea259b9..2f09990 100644
--- a/android/base/EintrWrapper_unittest.cpp
+++ b/android/base/EintrWrapper_unittest.cpp
@@ -29,12 +29,12 @@
using namespace ::android::base::testing;
class EintrWrapperTest : public ::testing::Test, LogOutput {
-public:
- EintrWrapperTest() :
+public:
+ EintrWrapperTest() :
mFatal(false),
mLogged(true),
mPrevious(LogOutput::setNewOutput(this)) {}
-
+
~EintrWrapperTest() {
LogOutput::setNewOutput(mPrevious);
}
@@ -47,7 +47,7 @@
if (mFatal)
longjmp(mJumper, 1);
}
-
+
protected:
bool mFatal;
bool mLogged;
@@ -55,7 +55,7 @@
jmp_buf mJumper;
};
-
+
// Loop counter used by several functions below.
static int gLoopCount = 0;
diff --git a/android/base/Log.cpp b/android/base/Log.cpp
index c4196eb..a5be52c 100644
--- a/android/base/Log.cpp
+++ b/android/base/Log.cpp
@@ -56,7 +56,7 @@
// easier. On the other hand, it means lots of logging will impact
// performance.
fflush(stderr);
-
+
if (params.severity >= LOG_FATAL)
exit(1);
}
@@ -72,8 +72,8 @@
}
} // namespace
-
-// DCHECK level.
+
+// DCHECK level.
bool dcheckIsEnabled() {
return gDcheckLevel;
@@ -90,7 +90,7 @@
LogSeverity getMinLogLevel() {
return 0;
}
-
+
// LogString
LogString::LogString(const char* fmt, ...) : mString(NULL) {
diff --git a/android/base/Log.h b/android/base/Log.h
index 5679b1b..d1ef3d3 100644
--- a/android/base/Log.h
+++ b/android/base/Log.h
@@ -65,7 +65,7 @@
// This means LOG(severity) should expand to something that can take
// << operators on its right hand side. This is achieved with the
// ternary '? :', as implemented by this helper macro.
-//
+//
// Unfortunately, a simple thing like:
//
// !(condition) ? (void)0 : (expr)
@@ -93,7 +93,7 @@
#define LOG(severity) \
LOG_LAZY_EVAL(LOG_IS_ON(severity), \
LOG_MESSAGE_STREAM_COMPACT(severity))
-
+
// A variant of LOG() that only performs logging if a specific condition
// is encountered. Note that |condition| is only evaluated if |severity|
// is high enough. Usage example:
@@ -124,7 +124,7 @@
#define PLOG_IF(severity, condition) \
LOG_LAZY_EVAL(LOG_IS_ON(severity) && (condition), \
PLOG_MESSAGE_STREAM_COMPACT(severity))
-
+
// Evaluate |condition|, and if it fails, log a fatal message.
// This is a better version of assert(), in the future, this will
// also break directly into the debugger for debug builds.
@@ -166,7 +166,7 @@
# define ENABLE_DCHECK 2
# endif
#endif
-
+
// DLOG_IS_ON(severity) is used to indicate whether DLOG() should print
// something for the current level.
#if ENABLE_DLOG
@@ -176,7 +176,7 @@
// not compiled in the final binary.
# define DLOG_IS_ON(severity) false
#endif
-
+
// DCHECK_IS_ON() is used to indicate whether DCHECK() should do anything.
#if ENABLE_DCHECK == 0
// NOTE: Compile-time constant ensures the DCHECK() statements are
@@ -212,7 +212,7 @@
#define DCHECK(condition) \
LOG_IF(FATAL, DCHECK_IS_ON() && !(condition)) \
<< "Check failed: " #condition ". "
-
+
// Convenience class used hold a formatted string for logging reasons.
// Usage example:
//
@@ -251,7 +251,7 @@
public:
LogStream(const char* file, int lineno, LogSeverity severity);
~LogStream();
-
+
inline LogStream& operator<<(const char* str) {
append(str);
return *this;
@@ -275,7 +275,7 @@
LogStream& operator<<(unsigned long long v);
LogStream& operator<<(float v);
LogStream& operator<<(double v);
-
+
const char* string() const { return mString ? mString : ""; }
size_t size() const { return mSize; }
const LogParams& params() const { return mParams; }
@@ -347,7 +347,7 @@
LogSeverity severity,
int errnoCode);
~ErrnoLogMessage();
-
+
LogStream& stream() const { return *mStream; }
private:
LogStream* mStream;
@@ -370,10 +370,10 @@
// Abstract interface to the output where the log messages are sent.
// IMPORTANT: Only use this for unit testing the log facility.
class LogOutput {
-public:
+public:
LogOutput() {}
virtual ~LogOutput() {}
-
+
// Send a full log message to the output. Not zero terminated, and
// Does not have a trailing \n which can be added by the implementation
// when writing the message to a file.
@@ -382,7 +382,7 @@
virtual void logMessage(const LogParams& params,
const char* message,
size_t message_len) = 0;
-
+
// Set a new log output, and return pointer to the previous
// implementation, which will be NULL for the default one.
// |newOutput| is either NULL (which means the default), or a
diff --git a/android/base/Log_unittest.cpp b/android/base/Log_unittest.cpp
index c72be6b..fd25efb 100644
--- a/android/base/Log_unittest.cpp
+++ b/android/base/Log_unittest.cpp
@@ -22,8 +22,8 @@
// Create a severity level which is guaranteed to never generate a log
// message. See LogOnlyEvaluatesArgumentsIfNeeded for usage.
-const LogSeverity LOG_INVISIBLE = -10000;
-
+const LogSeverity LOG_INVISIBLE = -10000;
+
class LogTest : public ::testing::Test, android::base::testing::LogOutput {
public:
LogTest() : mFatal(false) {
@@ -32,7 +32,7 @@
mBuffer[0] = '\x7f';
mBuffer[1] = '\0';
}
-
+
~LogTest() {
::android::base::testing::LogOutput::setNewOutput(mSavedOutput);
}
@@ -70,12 +70,12 @@
#if ENABLE_DCHECK != 0
class DCheckEnabledTest : public LogTest {
-public:
+public:
DCheckEnabledTest() : LogTest() {
// Ensure DCHECKS() always run.
mSavedLevel = setDcheckLevel(true);
}
-
+
~DCheckEnabledTest() {
setDcheckLevel(mSavedLevel);
}
@@ -90,7 +90,7 @@
DCheckDisabledTest() : LogTest() {
mSavedLevel = setDcheckLevel(false);
}
-
+
~DCheckDisabledTest() {
setDcheckLevel(mSavedLevel);
}
@@ -117,7 +117,7 @@
snprintf(mExpected,
sizeof(mExpected),
"%sError message: %s",
- suffix,
+ suffix,
strerror(errnoCode));
}
@@ -125,7 +125,7 @@
const char* message,
size_t messageLen) {
LogTest::logMessage(params, message, messageLen);
-
+
if (mForcedErrno != -1000)
errno = mForcedErrno;
}
diff --git a/android/base/StringView.h b/android/base/StringView.h
index 60819da..1304c63 100644
--- a/android/base/StringView.h
+++ b/android/base/StringView.h
@@ -68,7 +68,7 @@
mString(other.data()), mSize(other.size()) {}
// IMPORTANT: This is intentionally not 'explicit'.
- StringView(const char* string) :
+ StringView(const char* string) :
mString(string), mSize(strlen(string)) {}
explicit StringView(const String& str);
diff --git a/android/base/StringView_unittest.cpp b/android/base/StringView_unittest.cpp
index 5af614d..d04499f 100644
--- a/android/base/StringView_unittest.cpp
+++ b/android/base/StringView_unittest.cpp
@@ -20,7 +20,7 @@
StringView view;
EXPECT_TRUE(view.empty());
}
-
+
TEST(StringView, InitWithCString) {
static const char kString[] = "Hello";
StringView view(kString);
@@ -91,9 +91,9 @@
StringView view(kString);
EXPECT_EQ(kString, view.begin());
EXPECT_EQ(kString + kStringLen, view.end());
-
+
size_t n = 0;
- for (StringView::const_iterator it = view.begin();
+ for (StringView::const_iterator it = view.begin();
it != view.end(); ++it, ++n) {
EXPECT_EQ(kString[n], *it);
}
@@ -110,7 +110,7 @@
EXPECT_TRUE(view1 >= view2);
EXPECT_FALSE(view1 < view2);
EXPECT_FALSE(view1 > view2);
-
+
StringView view3("hell"); // Shorter, but first char is larger.
EXPECT_FALSE(view1 == view3);
EXPECT_TRUE(view1 != view3);
@@ -118,7 +118,7 @@
EXPECT_TRUE(view1 <= view3);
EXPECT_FALSE(view1 > view3);
EXPECT_FALSE(view1 >= view3);
-
+
StringView view4("Hell"); // Shorter, but first char is smaller.
EXPECT_FALSE(view1 == view4);
EXPECT_TRUE(view1 != view4);
diff --git a/android/base/files/PathUtils.cpp b/android/base/files/PathUtils.cpp
index f07871e..e1a229f 100644
--- a/android/base/files/PathUtils.cpp
+++ b/android/base/files/PathUtils.cpp
@@ -41,7 +41,7 @@
int ch = path[0];
if ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z'))
result = 2U;
- } else if (!strncmp(path, "\\\\.\\", 4) ||
+ } else if (!strncmp(path, "\\\\.\\", 4) ||
!strncmp(path, "\\\\?\\", 4)) {
// UNC prefixes.
return 4U;
@@ -134,7 +134,7 @@
void PathUtils::simplifyComponents(StringVector* components) {
StringVector stack;
for (StringVector::const_iterator it = components->begin();
- it != components->end();
+ it != components->end();
++it) {
if (*it == ".") {
// Ignore any instance of '.' from the list.
diff --git a/android/base/files/PathUtils_unittest.cpp b/android/base/files/PathUtils_unittest.cpp
index 35528ee..d4ca2b8 100644
--- a/android/base/files/PathUtils_unittest.cpp
+++ b/android/base/files/PathUtils_unittest.cpp
@@ -172,7 +172,7 @@
} kData[] = {
{ "", { { NULL }, { NULL } } },
{ "foo", {
- { "foo", NULL },
+ { "foo", NULL },
{ "foo", NULL } } },
{ "foo/", {
{ "foo", NULL },
@@ -193,7 +193,7 @@
{ "C:", "foo", NULL },
{ "C:/", "foo", NULL } } },
{ "/foo", {
- { "/", "foo", NULL },
+ { "/", "foo", NULL },
{ "/", "foo", NULL } } },
{ "\\foo", {
{ "\\foo", NULL },
diff --git a/android/base/memory/ScopedPtr.h b/android/base/memory/ScopedPtr.h
index 4b7d00b..36ed875 100644
--- a/android/base/memory/ScopedPtr.h
+++ b/android/base/memory/ScopedPtr.h
@@ -68,7 +68,7 @@
// Return a reference to the scoped object. Allows one to
// write (*foo).DoStuff().
T& operator*() { return *mPtr; }
-
+
// Return a pointer to the scoped object. Allows one to write
// foo->DoStuff().
T* operator->() { return mPtr; }
diff --git a/android/base/memory/ScopedPtr_unittest.cpp b/android/base/memory/ScopedPtr_unittest.cpp
index af9ea0b..3cf3092 100644
--- a/android/base/memory/ScopedPtr_unittest.cpp
+++ b/android/base/memory/ScopedPtr_unittest.cpp
@@ -23,7 +23,7 @@
void DoIncrement() {
(*mCountPtr)++;
}
-
+
~Foo() {
DoIncrement();
}
diff --git a/android/cmdline-option.c b/android/cmdline-option.c
index fb5aa23..d24410b 100644
--- a/android/cmdline-option.c
+++ b/android/cmdline-option.c
@@ -165,7 +165,7 @@
{
((char**)field)[0] = *aread++;
}
- else if (oo->var_type == OPTION_IS_LIST)
+ else if (oo->var_type == OPTION_IS_LIST)
{
ParamList** head = (ParamList**)field;
ParamList* pl;
diff --git a/android/config/check-esd.c b/android/config/check-esd.c
index 684afe2..68479b6 100644
--- a/android/config/check-esd.c
+++ b/android/config/check-esd.c
@@ -38,7 +38,7 @@
#undef ESD_FUNCTION
static void* esd_lib;
-int main( void )
+int main( void )
{
int fd;
diff --git a/android/config/check-pulseaudio.c b/android/config/check-pulseaudio.c
index c696ecf..57f8e81 100644
--- a/android/config/check-pulseaudio.c
+++ b/android/config/check-pulseaudio.c
@@ -39,7 +39,7 @@
#undef PULSEAUDIO_FUNCTION
static void* pa_lib;
-int main( void )
+int main( void )
{
int fd;
diff --git a/android/loadpng.c b/android/loadpng.c
index 218ae20..5abbd7d 100644
--- a/android/loadpng.c
+++ b/android/loadpng.c
@@ -17,7 +17,7 @@
unsigned char **rowptrs = 0;
png_structp p = 0;
png_infop pi = 0;
-
+
png_uint_32 width, height;
int bitdepth, colortype, imethod, cmethod, fmethod, i;
@@ -32,7 +32,7 @@
LOG("%s: failed to allocate png info struct\n", fn);
goto oops;
}
-
+
fp = fopen(fn, "rb");
if(fp == 0) {
LOG("%s: failed to open file\n", fn);
@@ -43,7 +43,7 @@
LOG("%s: failed to read header\n", fn);
goto oops;
}
-
+
if(png_sig_cmp(header, 0, 8)) {
LOG("%s: header is not a PNG header\n", fn);
goto oops;
@@ -81,7 +81,7 @@
png_set_filler(p, 0xff, PNG_FILLER_AFTER);
}
break;
-
+
case PNG_COLOR_TYPE_RGB_ALPHA:
break;
@@ -89,7 +89,7 @@
if(bitdepth < 8) {
png_set_gray_1_2_4_to_8(p);
}
-
+
default:
LOG("%s: unsupported (grayscale?) color type\n");
goto oops;
@@ -110,17 +110,17 @@
for(i = 0; i < height; i++) {
rowptrs[i] = data + ((width * 4) * i);
}
-
+
png_read_image(p, rowptrs);
-
+
png_destroy_read_struct(&p, &pi, 0);
fclose(fp);
if(rowptrs != 0) free(rowptrs);
*_width = width;
*_height = height;
-
- return (void*) data;
+
+ return (void*) data;
}
@@ -251,7 +251,7 @@
*_width = width;
*_height = height;
- return (void*) data;
+ return (void*) data;
}
@@ -260,7 +260,7 @@
{
unsigned w,h;
unsigned char *data;
-
+
if(argc < 2) return 0;
diff --git a/android/main-emulator.c b/android/main-emulator.c
index 3436a3c..150fe1e 100644
--- a/android/main-emulator.c
+++ b/android/main-emulator.c
@@ -137,7 +137,7 @@
if (androidOut != NULL) {
D("Found ANDROID_PRODUCT_OUT: %s\n", androidOut);
avdArch = path_getBuildTargetArch(androidOut);
- D("Found build target architecture: %s\n",
+ D("Found build target architecture: %s\n",
avdArch ? avdArch : "<NULL>");
}
}
diff --git a/android/main.c b/android/main.c
index de52a7a..0662bfe 100644
--- a/android/main.c
+++ b/android/main.c
@@ -988,7 +988,7 @@
args[n++] = "off";
}
- /* Pass boot properties to the core. First, those from boot.prop,
+ /* Pass boot properties to the core. First, those from boot.prop,
* then those from the command-line */
const FileData* bootProperties = avdInfo_getBootProperties(avd);
if (!fileData_isEmpty(bootProperties)) {
@@ -1003,7 +1003,7 @@
args[n++] = ASTRDUP(temp);
}
}
-
+
if (opts->prop != NULL) {
ParamList* pl = opts->prop;
for ( ; pl != NULL; pl = pl->next ) {
diff --git a/android/user-config.c b/android/user-config.c
index acd1a27..8cdbf78 100644
--- a/android/user-config.c
+++ b/android/user-config.c
@@ -64,7 +64,7 @@
if (inAndroidBuild) {
p = bufprint_config_file(temp, end, USER_CONFIG_FILE);
} else {
- p = bufprint(temp, end, "%s/%s", avdInfo_getContentPath(info),
+ p = bufprint(temp, end, "%s/%s", avdInfo_getContentPath(info),
USER_CONFIG_FILE);
}
diff --git a/android/utils/file_data.c b/android/utils/file_data.c
index 4c277b3..506c4f6 100644
--- a/android/utils/file_data.c
+++ b/android/utils/file_data.c
@@ -61,20 +61,20 @@
FILE* f = fopen(filePath, "rb");
if (!f)
return -errno;
-
+
int ret = 0;
do {
if (fseek(f, 0, SEEK_END) < 0) {
ret = -errno;
break;
}
-
+
long fileSize = ftell(f);
if (fileSize < 0) {
ret = -errno;
break;
}
-
+
if (fileSize == 0) {
fileData_initEmpty(data);
break;
@@ -84,13 +84,13 @@
ret = -errno;
break;
}
-
+
char* buffer = malloc((size_t)fileSize);
if (!buffer) {
ret = -errno;
break;
}
-
+
size_t readLen = fread(buffer, 1, (size_t)fileSize, f);
if (readLen != (size_t)fileSize) {
if (feof(f)) {
@@ -100,11 +100,11 @@
}
break;
}
-
+
fileData_initWith(data, buffer, readLen);
} while (0);
-
+
fclose(f);
return ret;
}
@@ -122,12 +122,12 @@
if (!copy) {
return -errno;
}
-
+
memcpy(copy, other->data, other->size);
fileData_initWith(data, copy, other->size);
return 0;
}
-
+
int fileData_initFromMemory(FileData* data,
const void* input,
@@ -146,7 +146,7 @@
uint8_t* buffer = data->data;
data->data = other->data;
other->data = buffer;
-
+
size_t size = data->size;
data->size = other->size;
other->size = size;
@@ -157,7 +157,7 @@
if (!fileData_isValid(data)) {
APANIC("Trying to finalize an un-initialized FileData instance\n");
}
-
+
free(data->data);
fileData_initWith(data, NULL, 0);
fileData_setInvalid(data);
diff --git a/android/utils/file_data_unittest.cpp b/android/utils/file_data_unittest.cpp
index 52bdae7..bb8a081 100644
--- a/android/utils/file_data_unittest.cpp
+++ b/android/utils/file_data_unittest.cpp
@@ -20,7 +20,7 @@
ScopedFileData(const void* buff, size_t length) {
mStatus = fileData_initFromMemory(&mFileData, buff, length);
}
-
+
explicit ScopedFileData(const ScopedFileData& other) {
mStatus = fileData_initFrom(&mFileData, other.ptr());
}
@@ -28,9 +28,9 @@
explicit ScopedFileData(const FileData* other) {
mStatus = fileData_initFrom(&mFileData, other);
}
-
+
~ScopedFileData() { fileData_done(&mFileData); }
-
+
int status() const { return mStatus; }
FileData* ptr() { return &mFileData; }
const FileData* ptr() const { return &mFileData; }
@@ -43,7 +43,7 @@
TEST(FileData, IsValid) {
EXPECT_FALSE(fileData_isValid(NULL));
-
+
FileData fakeData = { (uint8_t*)0x012345678, 12345, 23983 };
EXPECT_FALSE(fileData_isValid(&fakeData));
}
@@ -92,7 +92,7 @@
ScopedFileData data2(data1.ptr());
EXPECT_EQ(0, data2.status());
-
+
EXPECT_EQ(data1->size, data2->size);
EXPECT_NE(data1->data, data2->data);
for (size_t n = 0; n < data1->size; ++n) {
@@ -109,7 +109,7 @@
ScopedFileData data2;
EXPECT_EQ(0, data2.status());
fileData_swap(data1.ptr(), data2.ptr());
-
+
EXPECT_TRUE(fileData_isEmpty(data1.ptr()));
EXPECT_FALSE(fileData_isEmpty(data2.ptr()));
EXPECT_EQ(sizeof kData, data2->size);
diff --git a/android/utils/property_file.c b/android/utils/property_file.c
index 2e34678..3ac53e8 100644
--- a/android/utils/property_file.c
+++ b/android/utils/property_file.c
@@ -45,7 +45,7 @@
} else {
p = lineEnd + 1;
}
-
+
// Remove trailing \r before the \n, if any.
if (lineEnd > line && lineEnd[-1] == '\r')
lineEnd--;
@@ -53,13 +53,13 @@
// Skip leading whitespace.
while (line < lineEnd && isspace(line[0]))
line++;
-
+
// Skip empty lines, and those that begin with '#' for comments.
if (lineEnd == line || line[0] == '#')
continue;
const char* name = line;
- const char* nameEnd =
+ const char* nameEnd =
(const char*)memchr(name, '=', lineEnd - name);
if (!nameEnd) {
// Skipping lines without a =
@@ -68,7 +68,7 @@
const char* value = nameEnd + 1;
while (nameEnd > name && isspace(nameEnd[-1]))
nameEnd--;
-
+
size_t nameLen = nameEnd - name;
if (nameLen == 0 || nameLen >= MAX_PROPERTY_NAME_LEN) {
// Skip lines without names, or with names too long.
@@ -77,15 +77,15 @@
memcpy(iter->name, name, nameLen);
iter->name[nameLen] = '\0';
-
+
// Truncate value's length.
size_t valueLen = (lineEnd - value);
if (valueLen >= MAX_PROPERTY_VALUE_LEN)
valueLen = (MAX_PROPERTY_VALUE_LEN - 1);
-
+
memcpy(iter->value, value, valueLen);
iter->value[valueLen] = '\0';
-
+
iter->p = p;
return true;
}
diff --git a/android/utils/property_file_unittest.cpp b/android/utils/property_file_unittest.cpp
index 006eade..7877f38 100644
--- a/android/utils/property_file_unittest.cpp
+++ b/android/utils/property_file_unittest.cpp
@@ -34,7 +34,7 @@
String value(propertyFile_getValue(kFile, sizeof kFile, "foo"));
EXPECT_TRUE(value.str());
EXPECT_STREQ("bar", value.str());
-
+
String value2(propertyFile_getValue(kFile, sizeof kFile, "bar"));
EXPECT_FALSE(value2.str());
}
@@ -44,7 +44,7 @@
String value(propertyFile_getValue(kFile, sizeof kFile, "foo"));
EXPECT_TRUE(value.str());
EXPECT_STREQ("bar", value.str());
-
+
String value2(propertyFile_getValue(kFile, sizeof kFile, "bar"));
EXPECT_FALSE(value2.str());
}
@@ -54,11 +54,11 @@
"foo=bar\n"
"bar=zoo\n"
"sdk=4.2\n";
-
+
String foo(propertyFile_getValue(kFile, sizeof kFile, "foo"));
String bar(propertyFile_getValue(kFile, sizeof kFile, "bar"));
String sdk(propertyFile_getValue(kFile, sizeof kFile, "sdk"));
-
+
EXPECT_STREQ("bar", foo.str());
EXPECT_STREQ("zoo", bar.str());
EXPECT_STREQ("4.2", sdk.str());
@@ -69,11 +69,11 @@
"foo=bar\n"
"bar=zoo\n"
"sdk=4.2";
-
+
String foo(propertyFile_getValue(kFile, sizeof kFile, "foo"));
String bar(propertyFile_getValue(kFile, sizeof kFile, "bar"));
String sdk(propertyFile_getValue(kFile, sizeof kFile, "sdk"));
-
+
EXPECT_STREQ("bar", foo.str());
EXPECT_STREQ("zoo", bar.str());
EXPECT_STREQ("4.2", sdk.str());
@@ -84,11 +84,11 @@
"foo=bar\r\n"
"bar=zoo\r\n"
"sdk=4.2\n";
-
+
String foo(propertyFile_getValue(kFile, sizeof kFile, "foo"));
String bar(propertyFile_getValue(kFile, sizeof kFile, "bar"));
String sdk(propertyFile_getValue(kFile, sizeof kFile, "sdk"));
-
+
EXPECT_STREQ("bar", foo.str());
EXPECT_STREQ("zoo", bar.str());
EXPECT_STREQ("4.2", sdk.str());
@@ -120,7 +120,7 @@
}
TEST(PropertyFile, Iterator) {
- static const char kFile[] =
+ static const char kFile[] =
"foo=bar\n"
"this-name-is-too-long-and-will-be-ignored-by-the-parser=ahah\n"
"foo2=this-value-is-too-long-and-will-be-truncated-by-the-parser"
@@ -134,19 +134,19 @@
EXPECT_TRUE(propertyFileIterator_next(iter));
EXPECT_STREQ("foo", iter->name);
EXPECT_STREQ("bar", iter->value);
-
+
EXPECT_TRUE(propertyFileIterator_next(iter));
EXPECT_STREQ("foo2", iter->name);
EXPECT_STREQ("this-value-is-too-long-and-will-be-truncated-by-the-"
"parser-which-only-wants-something-small", iter->value);
-
+
EXPECT_TRUE(propertyFileIterator_next(iter));
EXPECT_STREQ("foo3", iter->name);
EXPECT_STREQ("bar", iter->value);
-
+
EXPECT_TRUE(propertyFileIterator_next(iter));
EXPECT_STREQ("bar", iter->name);
EXPECT_STREQ(" zoo", iter->value);
-
+
EXPECT_FALSE(propertyFileIterator_next(iter));
}
diff --git a/block/qcow2.c b/block/qcow2.c
index 9a4a4d1..cc6070f 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -65,7 +65,7 @@
}
-/*
+/*
* read qcow2 extension and fill bs
* start reading from start_offset
* finish reading upon magic of value 0 or when end_offset reached
diff --git a/elff/dwarf.h b/elff/dwarf.h
index 31ef714..7279321 100644
--- a/elff/dwarf.h
+++ b/elff/dwarf.h
@@ -18,9 +18,9 @@
any, provided herein do not apply to combinations of this program with
other software, or any other product whatsoever.
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
+ You should have received a copy of the GNU Lesser General Public
+ License along with this program; if not, write the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
USA.
Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
@@ -150,7 +150,7 @@
/* ALTIUM extensions */
/* DSP-C/Starcore __circ qualifier */
#define DW_TAG_ALTIUM_circ_type 0x5101 /* ALTIUM */
- /* Starcore __mwa_circ qualifier */
+ /* Starcore __mwa_circ qualifier */
#define DW_TAG_ALTIUM_mwa_circ_type 0x5102 /* ALTIUM */
/* Starcore __rev_carry qualifier */
#define DW_TAG_ALTIUM_rev_carry_type 0x5103 /* ALTIUM */
@@ -180,7 +180,7 @@
#define DW_TAG_SUN_f90_interface 0x420c /* SUN */
#define DW_TAG_SUN_fortran_vax_structure 0x420d /* SUN */
#define DW_TAG_SUN_hi 0x42ff /* SUN */
-
+
#define DW_TAG_hi_user 0xffff
@@ -429,7 +429,7 @@
/* PGI (STMicroelectronics) extensions. */
#define DW_AT_PGI_lbase 0x3a00 /* PGI. Block, constant, reference. This attribute is an ASTPLAB extension used to describe the array local base. */
-#define DW_AT_PGI_soffset 0x3a01 /* PGI. Block, constant, reference. ASTPLAB adds this attribute to describe the section offset, or the offset to the first element in the dimension. */
+#define DW_AT_PGI_soffset 0x3a01 /* PGI. Block, constant, reference. ASTPLAB adds this attribute to describe the section offset, or the offset to the first element in the dimension. */
#define DW_AT_PGI_lstride 0x3a02 /* PGI. Block, constant, reference. ASTPLAB adds this attribute to describe the linear stride or the distance between elements in the dimension. */
/* Apple Extensions for closures */
@@ -616,7 +616,7 @@
/* Apple extension. */
-#define DW_OP_APPLE_uninit 0xf0 /* Apple */
+#define DW_OP_APPLE_uninit 0xf0 /* Apple */
#define DW_OP_hi_user 0xff
@@ -693,7 +693,7 @@
#define DW_ATCF_SUN_branch_target 0x46 /* SUN */
#define DW_ATCF_SUN_mop_stack_probe 0x47 /* SUN */
#define DW_ATCF_SUN_func_epilog 0x48 /* SUN */
-#define DW_ATCF_hi_user 0xff /* SUN */
+#define DW_ATCF_hi_user 0xff /* SUN */
/* Accessibility code name. */
#define DW_ACCESS_public 0x01
@@ -762,10 +762,10 @@
#define DW_CC_ALTIUM_near_system_stack 0x66 /*ALTIUM */
/* Near function model, return address on user stack. */
-#define DW_CC_ALTIUM_near_user_stack 0x67 /* ALTIUM */
+#define DW_CC_ALTIUM_near_user_stack 0x67 /* ALTIUM */
/* Huge function model, return address on user stack. */
-#define DW_CC_ALTIUM_huge_user_stack 0x68 /* ALTIUM */
+#define DW_CC_ALTIUM_huge_user_stack 0x68 /* ALTIUM */
#define DW_CC_hi_user 0xff
@@ -827,7 +827,7 @@
#define DW_MACINFO_vendor_ext 0xff
/* CFA operator compaction (a space saving measure, see
- the DWARF standard) means DW_CFA_extended and DW_CFA_nop
+ the DWARF standard) means DW_CFA_extended and DW_CFA_nop
have the same value here. */
#define DW_CFA_advance_loc 0x40
#define DW_CFA_offset 0x80
@@ -872,9 +872,9 @@
#define DW_CFA_high_user 0x3f
/* GNU exception header encoding. See the Generic
- Elf Specification of the Linux Standard Base (LSB).
+ Elf Specification of the Linux Standard Base (LSB).
http://refspecs.freestandards.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/dwarfext.html
- The upper 4 bits indicate how the value is to be applied.
+ The upper 4 bits indicate how the value is to be applied.
The lower 4 bits indicate the format of the data.
*/
#define DW_EH_PE_absptr 0x00 /* GNU */
@@ -908,12 +908,12 @@
The DW_FRAME* names here are MIPS/SGI specfic.
Libdwarf interfaces defined in 2008 make the FRAME definitions
here (and the fixed table sizes they imply) obsolete.
- They are left here for compatibility.
-
+ They are left here for compatibility.
+
*/
/* Column used for CFA. Assumes reg 0 never appears as
a register in DWARF info. */
-#define DW_FRAME_CFA_COL 0
+#define DW_FRAME_CFA_COL 0
#define DW_FRAME_REG1 1 /* integer reg 1 */
#define DW_FRAME_REG2 2 /* integer reg 2 */
@@ -986,7 +986,7 @@
#define DW_FRAME_FREG31 63 /* 64-bit floating point reg 31 */
/* ***IMPORTANT NOTE, TARGET DEPENDENCY ****
- The following 4 #defines are dependent on
+ The following 4 #defines are dependent on
the target cpu(s) that you apply libdwarf to.
Ensure that DW_FRAME_UNDEFINED_VAL and DW_FRAME_SAME_VAL
do not conflict with the range [0-DW_FRAME_STATIC_LINK].
@@ -1006,10 +1006,10 @@
#ifndef DW_FRAME_HIGHEST_NORMAL_REGISTER
#define DW_FRAME_HIGHEST_NORMAL_REGISTER 63
#endif
-/* This is the number of columns in the Frame Table.
+/* This is the number of columns in the Frame Table.
This constant should
- be kept in sync with DW_REG_TABLE_SIZE defined in libdwarf.h
- It must also be large enough to be beyond the highest
+ be kept in sync with DW_REG_TABLE_SIZE defined in libdwarf.h
+ It must also be large enough to be beyond the highest
compiler-defined-register (meaning DW_FRAME_RA_COL DW_FRAME_STATIC_LINK
in the MIPS/IRIX case */
#ifndef DW_FRAME_LAST_REG_NUM
@@ -1017,7 +1017,7 @@
#endif
-/* Column recording ra (return addrress from a function call).
+/* Column recording ra (return addrress from a function call).
This is common to many architectures, but as a 'simple register'
is not necessarily adequate for all architectures.
For MIPS/IRIX this register number is actually recorded on disk
@@ -1025,7 +1025,7 @@
*/
#define DW_FRAME_RA_COL (DW_FRAME_HIGHEST_NORMAL_REGISTER + 1)
-/* Column recording static link applicable to up-level
+/* Column recording static link applicable to up-level
addressing, as in IRIX mp code, pascal, etc.
This is common to many architectures but
is not necessarily adequate for all architectures.
diff --git a/gdbstub.c b/gdbstub.c
index 2078f11..cea89dc 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -532,7 +532,7 @@
return 16;
} else if (n == CPU_NB_REGS) {
GET_REG32(env->mxcsr);
- }
+ }
} else {
n -= CPU_NB_REGS;
switch (n) {
@@ -1065,7 +1065,7 @@
case 36: env->CP0_Cause = tmp; break;
case 37: env->active_tc.PC = tmp; break;
case 72: /* fp, ignored */ break;
- default:
+ default:
if (n > 89)
return 0;
/* Other registers are readonly. Ignore writes. */
@@ -2176,7 +2176,7 @@
snprintf(buf, sizeof(buf), "S%02x", target_signal_to_gdb (sig));
put_packet(s, buf);
}
- /* put_packet() might have detected that the peer terminated the
+ /* put_packet() might have detected that the peer terminated the
connection. */
if (s->fd < 0)
return sig;
diff --git a/hw/android/android_mips.c b/hw/android/android_mips.c
index 8af287b..ed9f42f 100644
--- a/hw/android/android_mips.c
+++ b/hw/android/android_mips.c
@@ -132,7 +132,7 @@
strcpy (kernel_cmd, kernel_cmdline);
cpu_physical_memory_write(ram_size - TARGET_PAGE_SIZE, (void *)kernel_cmd, strlen(kernel_cmd) + 1);
-
+
#if 0
if (initrd_size > 0)
sprintf (phys_ram_base+cmdline, "%s rd_start=0x" TARGET_FMT_lx " rd_size=%li",
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
index 57af7a5..efee5b6 100644
--- a/hw/arm/armv7m.c
+++ b/hw/arm/armv7m.c
@@ -235,7 +235,7 @@
space. This stops qemu complaining about executing code outside RAM
when returning from an exception. */
cpu_register_physical_memory(0xfffff000, 0x1000,
- qemu_ram_alloc(NULL, "armv7m.hack",
+ qemu_ram_alloc(NULL, "armv7m.hack",
0x1000) | IO_MEM_RAM);
return pic;
}
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
index 055c858..01bd623 100644
--- a/hw/pci-host/piix.c
+++ b/hw/pci-host/piix.c
@@ -176,7 +176,7 @@
I440FXState *s;
s = g_malloc0(sizeof(I440FXState));
- b = pci_register_bus(NULL, "pci",
+ b = pci_register_bus(NULL, "pci",
piix3_set_irq, pci_slot_get_pirq, pic, 0, 4);
s->bus = b;
diff --git a/hw/usb/core.c b/hw/usb/core.c
index 19023be..04b4764 100644
--- a/hw/usb/core.c
+++ b/hw/usb/core.c
@@ -49,7 +49,7 @@
if (p->len != 8)
return USB_RET_STALL;
-
+
memcpy(s->setup_buf, p->data, 8);
s->setup_len = (s->setup_buf[7] << 8) | s->setup_buf[6];
s->setup_index = 0;
@@ -57,9 +57,9 @@
request = (s->setup_buf[0] << 8) | s->setup_buf[1];
value = (s->setup_buf[3] << 8) | s->setup_buf[2];
index = (s->setup_buf[5] << 8) | s->setup_buf[4];
-
+
if (s->setup_buf[0] & USB_DIR_IN) {
- ret = s->handle_control(s, request, value, index,
+ ret = s->handle_control(s, request, value, index,
s->setup_len, s->data_buf);
if (ret < 0)
return ret;
@@ -88,7 +88,7 @@
request = (s->setup_buf[0] << 8) | s->setup_buf[1];
value = (s->setup_buf[3] << 8) | s->setup_buf[2];
index = (s->setup_buf[5] << 8) | s->setup_buf[4];
-
+
switch(s->setup_state) {
case SETUP_STATE_ACK:
if (!(s->setup_buf[0] & USB_DIR_IN)) {
@@ -196,7 +196,7 @@
case USB_TOKEN_OUT:
return do_token_out(s, p);
-
+
default:
return USB_RET_STALL;
}
diff --git a/hw/usb/usb-dummy-android.c b/hw/usb/usb-dummy-android.c
index 6f76240..3aeb8cb 100755
--- a/hw/usb/usb-dummy-android.c
+++ b/hw/usb/usb-dummy-android.c
@@ -36,7 +36,7 @@
{
return 0;
}
-
+
void usb_host_info(Monitor *mon)
{
monitor_printf(mon, " No devices\n");
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 5de8255..c1a1839 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -83,7 +83,7 @@
CPUArchState *env, uintptr_t searched_pc);
void QEMU_NORETURN cpu_resume_from_signal(CPUArchState *env1, void *puc);
void QEMU_NORETURN cpu_io_recompile(CPUArchState *env, uintptr_t retaddr);
-TranslationBlock *tb_gen_code(CPUArchState *env,
+TranslationBlock *tb_gen_code(CPUArchState *env,
target_ulong pc, target_ulong cs_base, int flags,
int cflags);
void cpu_exec_init(CPUArchState *env);
diff --git a/include/hw/arm/pic.h b/include/hw/arm/pic.h
index ab7ef65..7fcae9c 100644
--- a/include/hw/arm/pic.h
+++ b/include/hw/arm/pic.h
@@ -1,4 +1,4 @@
-/*
+/*
* Generic ARM Programmable Interrupt Controller support.
*
* Copyright (c) 2006 CodeSourcery.
diff --git a/include/hw/bt.h b/include/hw/bt.h
index 4a702ad..a8d1ba9 100644
--- a/include/hw/bt.h
+++ b/include/hw/bt.h
@@ -886,14 +886,14 @@
typedef struct {
char name[248];
} __attribute__ ((packed)) change_local_name_cp;
-#define CHANGE_LOCAL_NAME_CP_SIZE 248
+#define CHANGE_LOCAL_NAME_CP_SIZE 248
#define OCF_READ_LOCAL_NAME 0x0014
typedef struct {
uint8_t status;
char name[248];
} __attribute__ ((packed)) read_local_name_rp;
-#define READ_LOCAL_NAME_RP_SIZE 249
+#define READ_LOCAL_NAME_RP_SIZE 249
#define OCF_READ_CONN_ACCEPT_TIMEOUT 0x0015
typedef struct {
@@ -990,7 +990,7 @@
uint8_t status;
uint8_t dev_class[3];
} __attribute__ ((packed)) read_class_of_dev_rp;
-#define READ_CLASS_OF_DEV_RP_SIZE 4
+#define READ_CLASS_OF_DEV_RP_SIZE 4
#define OCF_WRITE_CLASS_OF_DEV 0x0024
typedef struct {
diff --git a/include/hw/usb.h b/include/hw/usb.h
index 28723be..a6810fe 100644
--- a/include/hw/usb.h
+++ b/include/hw/usb.h
@@ -127,16 +127,16 @@
struct USBDevice {
void *opaque;
- /*
- * Process USB packet.
+ /*
+ * Process USB packet.
* Called by the HC (Host Controller).
*
- * Returns length of the transaction
+ * Returns length of the transaction
* or one of the USB_RET_XXX codes.
- */
+ */
int (*handle_packet)(USBDevice *dev, USBPacket *p);
- /*
+ /*
* Called when device is destroyed.
*/
void (*handle_destroy)(USBDevice *dev);
@@ -144,12 +144,12 @@
int speed;
/* The following fields are used by the generic USB device
- layer. They are here just to avoid creating a new structure
+ layer. They are here just to avoid creating a new structure
for them. */
/*
* Reset the device
- */
+ */
void (*handle_reset)(USBDevice *dev);
/*
diff --git a/include/qapi/qmp/json-parser.h b/include/qapi/qmp/json-parser.h
index 44d88f3..a90b3cb 100644
--- a/include/qapi/qmp/json-parser.h
+++ b/include/qapi/qmp/json-parser.h
@@ -1,5 +1,5 @@
/*
- * JSON Parser
+ * JSON Parser
*
* Copyright IBM, Corp. 2009
*
diff --git a/include/qemu/log.h b/include/qemu/log.h
index 343bd77..9072588 100644
--- a/include/qemu/log.h
+++ b/include/qemu/log.h
@@ -14,7 +14,7 @@
extern FILE *qemu_logfile;
extern int qemu_loglevel;
-/*
+/*
* The new API:
*
*/
diff --git a/include/qom/object.h b/include/qom/object.h
index a275db2..e420e10 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -985,12 +985,12 @@
* ambiguous match
*
* There are two types of supported paths--absolute paths and partial paths.
- *
+ *
* Absolute paths are derived from the root object and can follow child<> or
* link<> properties. Since they can follow link<> properties, they can be
* arbitrarily long. Absolute paths look like absolute filenames and are
* prefixed with a leading slash.
- *
+ *
* Partial paths look like relative filenames. They do not begin with a
* prefix. The matching rules for partial paths are subtle but designed to make
* specifying objects easy. At each level of the composition tree, the partial
diff --git a/log-rotate-android.c b/log-rotate-android.c
index 747a0a7..7c565eb 100644
--- a/log-rotate-android.c
+++ b/log-rotate-android.c
@@ -80,7 +80,7 @@
void qemu_log_rotation_poll(void) {
if (!rotate_logs_requested)
return;
-
+
FILE* new_dns_log_fd = rotate_log(get_slirp_dns_log_fd(),
dns_log_filename);
FILE* new_drop_log_fd = rotate_log(get_slirp_drop_log_fd(),
diff --git a/main-loop.c b/main-loop.c
index 8753a9b..0634ef0 100644
--- a/main-loop.c
+++ b/main-loop.c
@@ -863,8 +863,8 @@
#endif /* _WIN32 */
-static void alarm_timer_on_change_state_rearm(void *opaque,
- int running,
+static void alarm_timer_on_change_state_rearm(void *opaque,
+ int running,
int reason)
{
if (running)
diff --git a/net/net.c b/net/net.c
index b8a94af..efcd5d9 100644
--- a/net/net.c
+++ b/net/net.c
@@ -165,7 +165,7 @@
long int offset;
errno = 0;
- offset = strtol(p, &last_char, 0);
+ offset = strtol(p, &last_char, 0);
if (0 == errno && '\0' == *last_char &&
offset >= 0 && offset <= 0xFFFFFF) {
macaddr[3] = (offset & 0xFF0000) >> 16;
@@ -184,7 +184,7 @@
p++;
}
}
- return 0;
+ return 0;
}
return -1;
diff --git a/proxy/proxy_common.h b/proxy/proxy_common.h
index 0a52810..da5c788 100644
--- a/proxy/proxy_common.h
+++ b/proxy/proxy_common.h
@@ -75,14 +75,14 @@
/* this function is called to update the select file descriptor sets
* with those of the proxified connection sockets that are currently managed */
-extern void proxy_manager_select_fill( int *pcount,
- fd_set* read_fds,
- fd_set* write_fds,
+extern void proxy_manager_select_fill( int *pcount,
+ fd_set* read_fds,
+ fd_set* write_fds,
fd_set* err_fds);
/* this function is called to act on proxified connection sockets when network events arrive */
-extern void proxy_manager_poll( fd_set* read_fds,
- fd_set* write_fds,
+extern void proxy_manager_poll( fd_set* read_fds,
+ fd_set* write_fds,
fd_set* err_fds );
/* this function checks that one can connect to a given proxy. It will simply try to connect()
diff --git a/proxy/proxy_http_rewriter.c b/proxy/proxy_http_rewriter.c
index a45a5de..6c43036 100644
--- a/proxy/proxy_http_rewriter.c
+++ b/proxy/proxy_http_rewriter.c
@@ -442,7 +442,7 @@
method = strsep(&p, " ");
if (p == NULL) {
- PROXY_LOG("%s: can't parse method in '%'",
+ PROXY_LOG("%s: can't parse method in '%'",
root->name, line);
return DATA_ERROR;
}
@@ -690,7 +690,7 @@
conn->body_mode = BODY_UNTIL_CLOSE;
}
D("%s: body_length=%lld body_mode=%s",
- root->name, conn->body_length,
+ root->name, conn->body_length,
body_mode_str[conn->body_mode]);
proxy_connection_rewind(root);
@@ -832,7 +832,7 @@
if (avail <= 0) {
/* wait for some flush */
conn->body_is_full = 1;
- D("%s: waiting to flush %d bytes",
+ D("%s: waiting to flush %d bytes",
root->name, current);
return DATA_NEED_MORE;
}
@@ -849,7 +849,7 @@
/* a disconnection here is normal and signals the
* end of the body */
conn->body_total += root->str_recv;
- D("%s: body completed by close (%lld bytes)",
+ D("%s: body completed by close (%lld bytes)",
root->name, conn->body_total);
conn->body_is_closed = 1;
ret = DATA_COMPLETED;
@@ -864,7 +864,7 @@
conn->chunk_length -= avail;
if (conn->chunk_length == 0) {
- D("%s: chunk completed (%lld bytes)",
+ D("%s: chunk completed (%lld bytes)",
root->name, conn->chunk_total);
conn->body_total += conn->chunk_total;
conn->chunk_total = 0;
@@ -878,7 +878,7 @@
conn->body_total += avail;
if (conn->body_length == 0) {
- D("%s: body completed (%lld bytes)",
+ D("%s: body completed (%lld bytes)",
root->name, conn->body_total);
conn->body_is_closed = 1;
ret = DATA_COMPLETED;
diff --git a/proxy/proxy_int.h b/proxy/proxy_int.h
index b22cdf2..921ef19 100644
--- a/proxy/proxy_int.h
+++ b/proxy/proxy_int.h
@@ -105,7 +105,7 @@
proxy_connection_done( ProxyConnection* conn );
/* free the proxy connection object. this will also
- * close the corresponding socket unless the
+ * close the corresponding socket unless the
* 'keep_alive' flag is set to TRUE.
*/
extern void
diff --git a/qobject/json-lexer.c b/qobject/json-lexer.c
index 440df60..0fc4604 100644
--- a/qobject/json-lexer.c
+++ b/qobject/json-lexer.c
@@ -212,7 +212,7 @@
['\t'] = IN_WHITESPACE,
['\r'] = IN_WHITESPACE,
['\n'] = IN_WHITESPACE,
- },
+ },
/* escape */
[IN_ESCAPE_LL] = {
diff --git a/qobject/json-parser.c b/qobject/json-parser.c
index e7947b3..0e40076 100644
--- a/qobject/json-parser.c
+++ b/qobject/json-parser.c
@@ -1,5 +1,5 @@
/*
- * JSON Parser
+ * JSON Parser
*
* Copyright IBM, Corp. 2009
*
@@ -175,7 +175,7 @@
* \n
* \r
* \t
- * \u four-hex-digits
+ * \u four-hex-digits
*/
static QString *qstring_from_escaped_str(JSONParserContext *ctxt, QObject *token)
{
@@ -191,7 +191,7 @@
ptr++;
str = qstring_new();
- while (*ptr &&
+ while (*ptr &&
((double_quote && *ptr != '"') || (!double_quote && *ptr != '\''))) {
if (*ptr == '\\') {
ptr++;
@@ -579,7 +579,7 @@
return ret;
-out:
+out:
parser_context_restore(ctxt, saved_ctxt);
return NULL;
@@ -692,7 +692,7 @@
}
if (obj == NULL) {
obj = parse_keyword(ctxt);
- }
+ }
if (obj == NULL) {
obj = parse_literal(ctxt);
}
diff --git a/qobject/qjson.c b/qobject/qjson.c
index 6cf2511..931f42f 100644
--- a/qobject/qjson.c
+++ b/qobject/qjson.c
@@ -242,7 +242,7 @@
} else {
buffer[len] = 0;
}
-
+
qstring_append(str, buffer);
break;
}
diff --git a/qobject/qlist.c b/qobject/qlist.c
index 1ced0de..927486d 100644
--- a/qobject/qlist.c
+++ b/qobject/qlist.c
@@ -21,7 +21,7 @@
.code = QTYPE_QLIST,
.destroy = qlist_destroy_obj,
};
-
+
/**
* qlist_new(): Create a new QList
*
diff --git a/qom/object.c b/qom/object.c
index b705e39..773fda7 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -645,7 +645,7 @@
return;
}
- if (data->implements_type &&
+ if (data->implements_type &&
!object_class_dynamic_cast(k, data->implements_type)) {
return;
}
diff --git a/savevm.c b/savevm.c
index 088ea93..69f56b9 100644
--- a/savevm.c
+++ b/savevm.c
@@ -551,7 +551,7 @@
s->stdio_file = fopen(filename, mode);
if (!s->stdio_file)
goto fail;
-
+
if(mode[0] == 'w') {
s->file = qemu_fopen_ops(s, &stdio_file_write_ops);
} else {
diff --git a/slirp-android/debug.c b/slirp-android/debug.c
index 8e41010..c6acc12 100644
--- a/slirp-android/debug.c
+++ b/slirp-android/debug.c
@@ -18,7 +18,7 @@
extern char *strerror _P((int));
-/* Carry over one item from main.c so that the tty's restored.
+/* Carry over one item from main.c so that the tty's restored.
* Only done when the tty being used is /dev/tty --RedWolf */
extern struct termios slirp_tty_settings;
extern int slirp_tty_restore;
diff --git a/slirp-android/ip.h b/slirp-android/ip.h
index 5b53c03..7fe2eec 100644
--- a/slirp-android/ip.h
+++ b/slirp-android/ip.h
@@ -237,7 +237,7 @@
#define ipf_tos ipf_ip.ip_tos
#define ipf_len ipf_ip.ip_len
#define ipf_next ipf_link.next
-#define ipf_prev ipf_link.prev
+#define ipf_prev ipf_link.prev
/*
* Structure stored in mbuf in inpcb.ip_options
diff --git a/slirp-android/slirp.c b/slirp-android/slirp.c
index 2b66779..4d3dc9f 100644
--- a/slirp-android/slirp.c
+++ b/slirp-android/slirp.c
@@ -1137,7 +1137,7 @@
for (so = head->so_next; so != head; so = so->so_next) {
SockAddress local, foreign;
-
+
sock_address_init_inet(&local, so->so_laddr_ip, so->so_laddr_port);
sock_address_init_inet(&foreign, so->so_faddr_ip, so->so_faddr_port);
func(opaque, is_udp,
@@ -1256,7 +1256,7 @@
{
int ret;
struct socket *so = slirp_find_ctl_socket(addr_low_byte, guest_port);
-
+
if (!so)
return;
diff --git a/slirp-android/tcp.h b/slirp-android/tcp.h
index 3883d80..0d24915 100644
--- a/slirp-android/tcp.h
+++ b/slirp-android/tcp.h
@@ -112,7 +112,7 @@
/*
* User-settable options (used with setsockopt).
*/
-#undef TCP_NODELAY
+#undef TCP_NODELAY
#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */
#undef TCP_MAXSEG
/* #define TCP_MAXSEG 0x02 */ /* set maximum segment size */
diff --git a/slirp-android/tcp_input.c b/slirp-android/tcp_input.c
index c70e3f2..6fc2390 100644
--- a/slirp-android/tcp_input.c
+++ b/slirp-android/tcp_input.c
@@ -673,7 +673,7 @@
goto cont_input;
}
- if((tcp_fconnect(so) == -1) && (errno != EINPROGRESS) &&
+ if((tcp_fconnect(so) == -1) && (errno != EINPROGRESS) &&
(errno != EWOULDBLOCK) && (errno != EAGAIN)) {
u_char code=ICMP_UNREACH_NET;
DEBUG_MISC((dfd," tcp fconnect errno = %d-%s\n",
diff --git a/slirp-android/tcp_subr.c b/slirp-android/tcp_subr.c
index a679013..e17c207 100644
--- a/slirp-android/tcp_subr.c
+++ b/slirp-android/tcp_subr.c
@@ -469,7 +469,7 @@
}
/*-------------------------------------------------------------*/
- if ((ret=so->s=socket_create_inet(SOCKET_STREAM)) >= 0)
+ if ((ret=so->s=socket_create_inet(SOCKET_STREAM)) >= 0)
{
int s = so->s;
diff --git a/slirp-android/udp.c b/slirp-android/udp.c
index 15fed77..fce2a1d 100644
--- a/slirp-android/udp.c
+++ b/slirp-android/udp.c
@@ -303,7 +303,7 @@
}
int udp_output2_(struct socket *so, struct mbuf *m,
- const SockAddress* saddr,
+ const SockAddress* saddr,
const SockAddress* daddr,
int iptos)
{
diff --git a/slirp/ip.h b/slirp/ip.h
index 63e18a6..ed07175 100644
--- a/slirp/ip.h
+++ b/slirp/ip.h
@@ -235,7 +235,7 @@
#define ipf_tos ipf_ip.ip_tos
#define ipf_len ipf_ip.ip_len
#define ipf_next ipf_link.next
-#define ipf_prev ipf_link.prev
+#define ipf_prev ipf_link.prev
/*
* Structure stored in mbuf in inpcb.ip_options
diff --git a/slirp/libslirp.h b/slirp/libslirp.h
index d0df24b..94540df 100644
--- a/slirp/libslirp.h
+++ b/slirp/libslirp.h
@@ -19,7 +19,7 @@
void slirp_output(const uint8_t *pkt, int pkt_len);
void slirp_redir_loop(void (*func)(void *opaque, int is_udp,
- struct in_addr *laddr, u_int lport,
+ struct in_addr *laddr, u_int lport,
struct in_addr *faddr, u_int fport),
void *opaque);
int slirp_redir_rm(int is_udp, int host_port);
diff --git a/slirp/slirp.c b/slirp/slirp.c
index ed846da..a5a843f 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -691,7 +691,7 @@
if (ip_data_len + ETH_HLEN > sizeof(buf))
return;
-
+
if (!memcmp(client_ethaddr, zero_ethaddr, ETH_ALEN)) {
uint8_t arp_req[ETH_HLEN + sizeof(struct arphdr)];
struct ethhdr *reh = (struct ethhdr *)arp_req;
@@ -853,7 +853,7 @@
{
int ret;
struct socket *so = slirp_find_ctl_socket(addr_low_byte, guest_port);
-
+
if (!so)
return;
diff --git a/target-i386/hax-all.c b/target-i386/hax-all.c
index ef77eb5..c41a874 100644
--- a/target-i386/hax-all.c
+++ b/target-i386/hax-all.c
@@ -488,7 +488,7 @@
}
}
- /*
+ /*
* If we have an interrupt pending but the guest is not ready to
* receive it, request an interrupt window exit. This will cause
* a return to userspace as soon as the guest is ready to receive
diff --git a/target-i386/hax-darwin.c b/target-i386/hax-darwin.c
index ca4477d..c5fd741 100644
--- a/target-i386/hax-darwin.c
+++ b/target-i386/hax-darwin.c
@@ -198,7 +198,7 @@
return 0;
}
-/*
+/*
* Simply assume that the size should be bigger than the hax_tunnel,
* since the hax_tunnel can be extended later with backward
* compatibility.
diff --git a/target-i386/helper.c b/target-i386/helper.c
index c03412a..1b96133 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -60,30 +60,30 @@
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
};
-static void add_flagname_to_bitmaps(char *flagname, uint32_t *features,
- uint32_t *ext_features,
- uint32_t *ext2_features,
+static void add_flagname_to_bitmaps(char *flagname, uint32_t *features,
+ uint32_t *ext_features,
+ uint32_t *ext2_features,
uint32_t *ext3_features)
{
int i;
int found = 0;
- for ( i = 0 ; i < 32 ; i++ )
+ for ( i = 0 ; i < 32 ; i++ )
if (feature_name[i] && !strcmp (flagname, feature_name[i])) {
*features |= 1 << i;
found = 1;
}
- for ( i = 0 ; i < 32 ; i++ )
+ for ( i = 0 ; i < 32 ; i++ )
if (ext_feature_name[i] && !strcmp (flagname, ext_feature_name[i])) {
*ext_features |= 1 << i;
found = 1;
}
- for ( i = 0 ; i < 32 ; i++ )
+ for ( i = 0 ; i < 32 ; i++ )
if (ext2_feature_name[i] && !strcmp (flagname, ext2_feature_name[i])) {
*ext2_features |= 1 << i;
found = 1;
}
- for ( i = 0 ; i < 32 ; i++ )
+ for ( i = 0 ; i < 32 ; i++ )
if (ext3_feature_name[i] && !strcmp (flagname, ext3_feature_name[i])) {
*ext3_features |= 1 << i;
found = 1;
@@ -142,13 +142,13 @@
.family = 6,
.model = 2,
.stepping = 3,
- .features = PPRO_FEATURES |
+ .features = PPRO_FEATURES |
/* these features are needed for Win64 and aren't fully implemented */
CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA |
/* this feature is needed for Solaris and isn't fully implemented */
CPUID_PSE36,
.ext_features = CPUID_EXT_SSE3,
- .ext2_features = (PPRO_FEATURES & 0x0183F3FF) |
+ .ext2_features = (PPRO_FEATURES & 0x0183F3FF) |
CPUID_EXT2_LM | CPUID_EXT2_SYSCALL | CPUID_EXT2_NX |
CPUID_EXT2_3DNOW | CPUID_EXT2_3DNOWEXT,
.ext3_features = CPUID_EXT3_SVM,
@@ -165,13 +165,13 @@
.model = 2,
.stepping = 3,
/* Missing: CPUID_VME, CPUID_HT */
- .features = PPRO_FEATURES |
+ .features = PPRO_FEATURES |
CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA |
CPUID_PSE36,
/* Missing: CPUID_EXT_CX16, CPUID_EXT_POPCNT */
.ext_features = CPUID_EXT_SSE3 | CPUID_EXT_MONITOR,
/* Missing: CPUID_EXT2_PDPE1GB, CPUID_EXT2_RDTSCP */
- .ext2_features = (PPRO_FEATURES & 0x0183F3FF) |
+ .ext2_features = (PPRO_FEATURES & 0x0183F3FF) |
CPUID_EXT2_LM | CPUID_EXT2_SYSCALL | CPUID_EXT2_NX |
CPUID_EXT2_3DNOW | CPUID_EXT2_3DNOWEXT | CPUID_EXT2_MMXEXT |
CPUID_EXT2_FFXSR,
@@ -1254,7 +1254,7 @@
error_code |= PG_ERROR_I_D_MASK;
if (env->intercept_exceptions & (1 << EXCP0E_PAGE)) {
/* cr2 is not modified in case of exceptions */
- stq_phys(env->vm_vmcb + offsetof(struct vmcb, control.exit_info_2),
+ stq_phys(env->vm_vmcb + offsetof(struct vmcb, control.exit_info_2),
addr);
} else {
env->cr[2] = addr;
@@ -1732,7 +1732,7 @@
break;
case 0x80000008:
/* virtual & phys address size in low 2 bytes. */
-/* XXX: This value must match the one used in the MMU code. */
+/* XXX: This value must match the one used in the MMU code. */
if (env->cpuid_ext2_features & CPUID_EXT2_LM) {
/* 64 bit processor */
/* XXX: The physical address space is limited to 42 bits in exec.c. */
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 609eb6e..e96d5b5 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -211,7 +211,7 @@
int ret;
/* first time */
- if (has_msr_star == 0) {
+ if (has_msr_star == 0) {
struct kvm_msr_list msr_list, *kvm_msr_list;
has_msr_star = -1;
@@ -269,7 +269,7 @@
*/
return kvm_vm_ioctl(s, KVM_SET_TSS_ADDR, 0xfffbd000);
}
-
+
static void set_v8086_seg(struct kvm_segment *lhs, const SegmentCache *rhs)
{
lhs->selector = rhs->selector;
@@ -503,7 +503,7 @@
if (ret < 0)
return ret;
- memcpy(env->interrupt_bitmap,
+ memcpy(env->interrupt_bitmap,
sregs.interrupt_bitmap,
sizeof(sregs.interrupt_bitmap));
@@ -751,7 +751,7 @@
env->eflags |= IF_MASK;
else
env->eflags &= ~IF_MASK;
-
+
cpu_set_apic_tpr(env, run->cr8);
cpu_set_apic_base(env, run->apic_base);
diff --git a/target-i386/machine.c b/target-i386/machine.c
index 58a87f1..665b6bd 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -120,7 +120,7 @@
qemu_put_be64s(f, &env->pat);
qemu_put_be32s(f, &env->hflags2);
-
+
qemu_put_be64s(f, &env->vm_hsave);
qemu_put_be64s(f, &env->vm_vmcb);
qemu_put_be64s(f, &env->tsc_offset);
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index cadc2e8..5ab2a25 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -58,7 +58,7 @@
{
TranslationBlock *tb;
unsigned long pc = (unsigned long) pc_ptr;
-
+
tb = tb_find_pc (pc);
if (tb) {
cpu_restore_state (tb, env, pc);
@@ -1939,8 +1939,8 @@
helper_raise_exception(EXCP_DBE);
}
/*
- * The following functions are address translation helper functions
- * for fast memory access in QEMU.
+ * The following functions are address translation helper functions
+ * for fast memory access in QEMU.
*/
static unsigned long v2p_mmu(target_ulong addr, int is_user)
{
@@ -1963,9 +1963,9 @@
return physaddr;
}
-/*
- * translation from virtual address of simulated OS
- * to the address of simulation host (not the physical
+/*
+ * translation from virtual address of simulated OS
+ * to the address of simulation host (not the physical
* address of simulated OS.
*/
unsigned long v2p(target_ulong ptr, int is_user)
@@ -1979,7 +1979,7 @@
env = cpu_single_env;
addr = ptr;
index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
- if (__builtin_expect(env->tlb_table[is_user][index].addr_read !=
+ if (__builtin_expect(env->tlb_table[is_user][index].addr_read !=
(addr & TARGET_PAGE_MASK), 0)) {
physaddr = v2p_mmu(addr, is_user);
} else {
diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h
index a869cf5..ec85c51 100644
--- a/tcg/i386/tcg-target.h
+++ b/tcg/i386/tcg-target.h
@@ -70,7 +70,7 @@
#define TCG_CT_CONST_U32 0x200
/* used for function call generation */
-#define TCG_REG_CALL_STACK TCG_REG_ESP
+#define TCG_REG_CALL_STACK TCG_REG_ESP
#define TCG_TARGET_STACK_ALIGN 16
#define TCG_TARGET_CALL_STACK_OFFSET 0
diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h
index 207a89f..71f6e8a 100644
--- a/tcg/tcg-op.h
+++ b/tcg/tcg-op.h
@@ -1456,7 +1456,7 @@
tcg_gen_op2_i32(INDEX_op_bswap16_i32, ret, arg);
#else
TCGv_i32 t0 = tcg_temp_new_i32();
-
+
tcg_gen_ext8u_i32(t0, arg);
tcg_gen_shli_i32(t0, t0, 8);
tcg_gen_shri_i32(ret, arg, 8);
@@ -1473,17 +1473,17 @@
TCGv_i32 t0, t1;
t0 = tcg_temp_new_i32();
t1 = tcg_temp_new_i32();
-
+
tcg_gen_shli_i32(t0, arg, 24);
-
+
tcg_gen_andi_i32(t1, arg, 0x0000ff00);
tcg_gen_shli_i32(t1, t1, 8);
tcg_gen_or_i32(t0, t0, t1);
-
+
tcg_gen_shri_i32(t1, arg, 8);
tcg_gen_andi_i32(t1, t1, 0x0000ff00);
tcg_gen_or_i32(t0, t0, t1);
-
+
tcg_gen_shri_i32(t1, arg, 24);
tcg_gen_or_i32(ret, t0, t1);
tcg_temp_free_i32(t0);
@@ -1703,13 +1703,13 @@
#else
TCGv_i64 t0 = tcg_temp_new_i64();
TCGv_i64 t1 = tcg_temp_new_i64();
-
+
tcg_gen_shli_i64(t0, arg, 56);
-
+
tcg_gen_andi_i64(t1, arg, 0x0000ff00);
tcg_gen_shli_i64(t1, t1, 40);
tcg_gen_or_i64(t0, t0, t1);
-
+
tcg_gen_andi_i64(t1, arg, 0x00ff0000);
tcg_gen_shli_i64(t1, t1, 24);
tcg_gen_or_i64(t0, t0, t1);
@@ -1721,7 +1721,7 @@
tcg_gen_shri_i64(t1, arg, 8);
tcg_gen_andi_i64(t1, t1, 0xff000000);
tcg_gen_or_i64(t0, t0, t1);
-
+
tcg_gen_shri_i64(t1, arg, 24);
tcg_gen_andi_i64(t1, t1, 0x00ff0000);
tcg_gen_or_i64(t0, t0, t1);
@@ -2169,7 +2169,7 @@
{
/* XXX: must really use a 32 bit size for TCGArg in all cases */
#if TARGET_LONG_BITS > TCG_TARGET_REG_BITS
- tcg_gen_op2ii(INDEX_op_debug_insn_start,
+ tcg_gen_op2ii(INDEX_op_debug_insn_start,
(uint32_t)(pc), (uint32_t)(pc >> 32));
#else
tcg_gen_op1i(INDEX_op_debug_insn_start, pc);
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 3c9346d..921e772 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -65,7 +65,7 @@
static void tcg_target_init(TCGContext *s);
static void tcg_target_qemu_prologue(TCGContext *s);
-static void patch_reloc(uint8_t *code_ptr, int type,
+static void patch_reloc(uint8_t *code_ptr, int type,
tcg_target_long value, tcg_target_long addend);
static TCGOpDef tcg_op_defs[] = {
@@ -119,7 +119,7 @@
l = &s->labels[label_index];
if (l->has_value) {
/* FIXME: This may break relocations on RISC targets that
- modify instruction fields in place. The caller may not have
+ modify instruction fields in place. The caller may not have
written the initial value. */
patch_reloc(code_ptr, type, l->u.value, addend);
} else {
@@ -133,7 +133,7 @@
}
}
-static void tcg_out_label(TCGContext *s, int label_index,
+static void tcg_out_label(TCGContext *s, int label_index,
tcg_target_long value)
{
TCGLabel *l;
@@ -173,7 +173,7 @@
{
TCGPool *p;
int pool_size;
-
+
if (size > TCG_POOL_CHUNK_SIZE) {
/* big malloc: insert a new pool (XXX: could optimize) */
p = g_malloc(sizeof(TCGPool) + size);
@@ -196,7 +196,7 @@
p = g_malloc(sizeof(TCGPool) + pool_size);
p->size = pool_size;
p->next = NULL;
- if (s->pool_current)
+ if (s->pool_current)
s->pool_current->next = p;
else
s->pool_first = p;
@@ -227,7 +227,7 @@
memset(s, 0, sizeof(*s));
s->temps = s->static_temps;
s->nb_globals = 0;
-
+
/* Count total number of arguments and allocate the corresponding
space */
total_args = 0;
@@ -248,7 +248,7 @@
sorted_args += n;
args_ct += n;
}
-
+
tcg_target_init(s);
}
@@ -258,7 +258,7 @@
s->code_buf = code_gen_prologue;
s->code_ptr = s->code_buf;
tcg_target_qemu_prologue(s);
- flush_icache_range((unsigned long)s->code_buf,
+ flush_icache_range((unsigned long)s->code_buf,
(unsigned long)s->code_ptr);
}
@@ -792,7 +792,7 @@
if (idx < s->nb_globals) {
pstrcpy(buf, buf_size, ts->name);
} else {
- if (ts->temp_local)
+ if (ts->temp_local)
snprintf(buf, buf_size, "loc%d", idx - s->nb_globals);
else
snprintf(buf, buf_size, "tmp%d", idx - s->nb_globals);
@@ -830,7 +830,7 @@
tcg_target_ulong v;
if (unlikely(!s->helpers_sorted)) {
- qsort(s->helpers, s->nb_helpers, sizeof(TCGHelperInfo),
+ qsort(s->helpers, s->nb_helpers, sizeof(TCGHelperInfo),
helper_cmp);
s->helpers_sorted = 1;
}
@@ -890,7 +890,7 @@
#else
pc = args[0];
#endif
- if (!first_insn)
+ if (!first_insn)
fprintf(outfile, "\n");
fprintf(outfile, " ---- 0x%" PRIx64, pc);
first_insn = 0;
@@ -930,7 +930,7 @@
tcg_get_arg_str_idx(s, buf, sizeof(buf), args[nb_oargs + i]));
}
}
- } else if (c == INDEX_op_movi_i32
+ } else if (c == INDEX_op_movi_i32
#if TCG_TARGET_REG_BITS == 64
|| c == INDEX_op_movi_i64
#endif
@@ -941,7 +941,7 @@
nb_oargs = def->nb_oargs;
nb_iargs = def->nb_iargs;
nb_cargs = def->nb_cargs;
- fprintf(outfile, " %s %s,$", def->name,
+ fprintf(outfile, " %s %s,$", def->name,
tcg_get_arg_str_idx(s, buf, sizeof(buf), args[0]));
val = args[1];
th = tcg_find_helper(s, val);
@@ -965,7 +965,7 @@
nb_iargs = def->nb_iargs;
nb_cargs = def->nb_cargs;
}
-
+
k = 0;
for(i = 0; i < nb_oargs; i++) {
if (k != 0)
@@ -1163,7 +1163,7 @@
#ifdef USE_LIVENESS_ANALYSIS
/* set a nop for an operation using 'nb_args' */
-static inline void tcg_set_nop(TCGContext *s, uint16_t *opc_ptr,
+static inline void tcg_set_nop(TCGContext *s, uint16_t *opc_ptr,
TCGArg *args, int nb_args)
{
if (nb_args == 0) {
@@ -1227,7 +1227,7 @@
nb_ops = gen_opc_ptr - gen_opc_buf;
s->op_dead_iargs = tcg_malloc(nb_ops * sizeof(uint16_t));
-
+
dead_temps = tcg_malloc(s->nb_temps);
memset(dead_temps, 1, s->nb_temps);
@@ -1256,7 +1256,7 @@
if (!dead_temps[arg])
goto do_not_remove_call;
}
- tcg_set_nop(s, gen_opc_buf + op_index,
+ tcg_set_nop(s, gen_opc_buf + op_index,
args - 1, nb_args);
} else {
do_not_remove_call:
@@ -1266,7 +1266,7 @@
arg = args[i];
dead_temps[arg] = 1;
}
-
+
if (!(call_flags & TCG_CALL_CONST)) {
/* globals are live (they may be used by the call) */
memset(dead_temps, 0, s->nb_globals);
diff --git a/tcg/tcg.h b/tcg/tcg.h
index 3fab8d6..3598e96 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -70,7 +70,7 @@
int type;
uint8_t *ptr;
tcg_target_long addend;
-} TCGRelocation;
+} TCGRelocation;
typedef struct TCGLabel {
int has_value;
@@ -193,7 +193,7 @@
/* A pure function only reads its arguments and TCG global variables
and cannot raise exceptions. Hence a call to a pure function can be
safely suppressed if the return value is not used. */
-#define TCG_CALL_PURE 0x0010
+#define TCG_CALL_PURE 0x0010
/* A const function only reads its arguments and does not use TCG
global variables. Hence a call to such a function does not
save TCG global variables back to their canonical location. */
@@ -277,7 +277,7 @@
int nb_globals;
int nb_temps;
/* index of free temps, -1 if none */
- int first_free_temp[TCG_TYPE_COUNT * 2];
+ int first_free_temp[TCG_TYPE_COUNT * 2];
/* goto_tb support */
uint8_t *code_buf;
@@ -288,7 +288,7 @@
/* liveness analysis */
uint16_t *op_dead_iargs; /* for each operation, each bit tells if the
corresponding input argument is dead */
-
+
/* tells in which temporary a given register is. It does not take
into account fixed registers */
int reg_to_temp[TCG_TARGET_NB_REGS];
@@ -428,7 +428,7 @@
#define TCG_OPF_BB_END 0x01 /* instruction defines the end of a basic
block */
-#define TCG_OPF_CALL_CLOBBER 0x02 /* instruction clobbers call registers
+#define TCG_OPF_CALL_CLOBBER 0x02 /* instruction clobbers call registers
and potentially update globals. */
#define TCG_OPF_SIDE_EFFECTS 0x04 /* instruction has side effects : it
cannot be removed if its output
@@ -444,7 +444,7 @@
int used;
#endif
} TCGOpDef;
-
+
typedef struct TCGTargetOpDef {
TCGOpcode op;
const char *args_ct_str[TCG_MAX_OP_ARGS];
diff --git a/tcg/x86_64/tcg-target.c b/tcg/x86_64/tcg-target.c
index 03ec23e..bef3858 100644
--- a/tcg/x86_64/tcg-target.c
+++ b/tcg/x86_64/tcg-target.c
@@ -71,13 +71,13 @@
};
static const int tcg_target_call_oarg_regs[2] = {
- TCG_REG_RAX,
- TCG_REG_RDX
+ TCG_REG_RAX,
+ TCG_REG_RDX
};
static uint8_t *tb_ret_addr;
-static void patch_reloc(uint8_t *code_ptr, int type,
+static void patch_reloc(uint8_t *code_ptr, int type,
tcg_target_long value, tcg_target_long addend)
{
value += addend;
@@ -221,7 +221,7 @@
#define P_REXW 0x200 /* set rex.w = 1 */
#define P_REXB_R 0x400 /* REG field as byte register */
#define P_REXB_RM 0x800 /* R/M field as byte register */
-
+
static const uint8_t tcg_cond_to_jcc[10] = {
[TCG_COND_EQ] = JCC_JE,
[TCG_COND_NE] = JCC_JNE,
@@ -268,7 +268,7 @@
}
/* rm < 0 means no register index plus (-rm - 1 immediate bytes) */
-static inline void tcg_out_modrm_offset(TCGContext *s, int opc, int r, int rm,
+static inline void tcg_out_modrm_offset(TCGContext *s, int opc, int r, int rm,
tcg_target_long offset)
{
if (rm < 0) {
@@ -317,7 +317,7 @@
#if defined(CONFIG_SOFTMMU)
/* XXX: incomplete. index must be different from ESP */
-static void tcg_out_modrm_offset2(TCGContext *s, int opc, int r, int rm,
+static void tcg_out_modrm_offset2(TCGContext *s, int opc, int r, int rm,
int index, int shift,
tcg_target_long offset)
{
@@ -359,7 +359,7 @@
tcg_out_modrm(s, 0x8b | P_REXW, ret, arg);
}
-static inline void tcg_out_movi(TCGContext *s, TCGType type,
+static inline void tcg_out_movi(TCGContext *s, TCGType type,
int ret, tcg_target_long arg)
{
if (arg == 0) {
@@ -467,7 +467,7 @@
{
int32_t val, val1;
TCGLabel *l = &s->labels[label_index];
-
+
if (l->has_value) {
val = l->u.value - (tcg_target_long)s->code_ptr;
val1 = val - 2;
@@ -582,13 +582,13 @@
/* mov */
tcg_out_modrm(s, 0x8b | rexw, r0, addr_reg);
-
+
tcg_out_modrm(s, 0xc1 | rexw, 5, r1); /* shr $x, r1 */
- tcg_out8(s, TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS);
-
+ tcg_out8(s, TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS);
+
tcg_out_modrm(s, 0x81 | rexw, 4, r0); /* andl $x, r0 */
tcg_out32(s, TARGET_PAGE_MASK | ((1 << s_bits) - 1));
-
+
tcg_out_modrm(s, 0x81, 4, r1); /* andl $x, r1 */
tcg_out32(s, (CPU_TLB_SIZE - 1) << CPU_TLB_ENTRY_BITS);
@@ -598,10 +598,10 @@
/* cmp 0(r1), r0 */
tcg_out_modrm_offset(s, 0x3b | rexw, r0, r1, 0);
-
+
/* mov */
tcg_out_modrm(s, 0x8b | rexw, r0, addr_reg);
-
+
/* je label1 */
tcg_out8(s, 0x70 + JCC_JE);
label1_ptr = s->code_ptr;
@@ -646,12 +646,12 @@
tcg_out8(s, 0xeb);
label2_ptr = s->code_ptr;
s->code_ptr++;
-
+
/* label1: */
*label1_ptr = s->code_ptr - label1_ptr - 1;
/* add x(r1), r0 */
- tcg_out_modrm_offset(s, 0x03 | P_REXW, r0, r1, offsetof(CPUTLBEntry, addend) -
+ tcg_out_modrm_offset(s, 0x03 | P_REXW, r0, r1, offsetof(CPUTLBEntry, addend) -
offsetof(CPUTLBEntry, addr_read));
offset = 0;
#else
@@ -667,7 +667,7 @@
/* addq addr_reg, r0 */
tcg_out_modrm(s, 0x01 | P_REXW, addr_reg, r0);
}
-#endif
+#endif
#ifdef TARGET_WORDS_BIGENDIAN
bswap = 1;
@@ -688,7 +688,7 @@
tcg_out_modrm_offset(s, 0xb7 | P_EXT, data_reg, r0, offset);
if (bswap) {
/* rolw $8, data_reg */
- tcg_out8(s, 0x66);
+ tcg_out8(s, 0x66);
tcg_out_modrm(s, 0xc1, 0, data_reg);
tcg_out8(s, 8);
}
@@ -698,7 +698,7 @@
/* movzwl */
tcg_out_modrm_offset(s, 0xb7 | P_EXT, data_reg, r0, offset);
/* rolw $8, data_reg */
- tcg_out8(s, 0x66);
+ tcg_out8(s, 0x66);
tcg_out_modrm(s, 0xc1, 0, data_reg);
tcg_out8(s, 8);
@@ -777,13 +777,13 @@
/* mov */
tcg_out_modrm(s, 0x8b | rexw, r0, addr_reg);
-
+
tcg_out_modrm(s, 0xc1 | rexw, 5, r1); /* shr $x, r1 */
- tcg_out8(s, TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS);
-
+ tcg_out8(s, TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS);
+
tcg_out_modrm(s, 0x81 | rexw, 4, r0); /* andl $x, r0 */
tcg_out32(s, TARGET_PAGE_MASK | ((1 << s_bits) - 1));
-
+
tcg_out_modrm(s, 0x81, 4, r1); /* andl $x, r1 */
tcg_out32(s, (CPU_TLB_SIZE - 1) << CPU_TLB_ENTRY_BITS);
@@ -793,10 +793,10 @@
/* cmp 0(r1), r0 */
tcg_out_modrm_offset(s, 0x3b | rexw, r0, r1, 0);
-
+
/* mov */
tcg_out_modrm(s, 0x8b | rexw, r0, addr_reg);
-
+
/* je label1 */
tcg_out8(s, 0x70 + JCC_JE);
label1_ptr = s->code_ptr;
@@ -828,12 +828,12 @@
tcg_out8(s, 0xeb);
label2_ptr = s->code_ptr;
s->code_ptr++;
-
+
/* label1: */
*label1_ptr = s->code_ptr - label1_ptr - 1;
/* add x(r1), r0 */
- tcg_out_modrm_offset(s, 0x03 | P_REXW, r0, r1, offsetof(CPUTLBEntry, addend) -
+ tcg_out_modrm_offset(s, 0x03 | P_REXW, r0, r1, offsetof(CPUTLBEntry, addend) -
offsetof(CPUTLBEntry, addr_write));
offset = 0;
#else
@@ -907,7 +907,7 @@
const int *const_args)
{
int c;
-
+
switch(opc) {
case INDEX_op_exit_tb:
tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_RAX, args[0]);
@@ -922,8 +922,8 @@
} else {
/* indirect jump method */
/* jmp Ev */
- tcg_out_modrm_offset(s, 0xff, 4, -1,
- (tcg_target_long)(s->tb_next +
+ tcg_out_modrm_offset(s, 0xff, 4, -1,
+ (tcg_target_long)(s->tb_next +
args[0]));
}
s->tb_next_offset[args[0]] = s->code_ptr - s->code_buf;
@@ -990,7 +990,7 @@
/* movq */
tcg_out_modrm_offset(s, 0x8b | P_REXW, args[0], args[1], args[2]);
break;
-
+
case INDEX_op_st8_i32:
case INDEX_op_st8_i64:
/* movb */
@@ -1154,11 +1154,11 @@
goto gen_shift64;
case INDEX_op_brcond_i32:
- tcg_out_brcond(s, args[2], args[0], args[1], const_args[1],
+ tcg_out_brcond(s, args[2], args[0], args[1], const_args[1],
args[3], 0);
break;
case INDEX_op_brcond_i64:
- tcg_out_brcond(s, args[2], args[0], args[1], const_args[1],
+ tcg_out_brcond(s, args[2], args[0], args[1], const_args[1],
args[3], P_REXW);
break;
@@ -1247,7 +1247,7 @@
case INDEX_op_qemu_ld64:
tcg_out_qemu_ld(s, args, 3);
break;
-
+
case INDEX_op_qemu_st8:
tcg_out_qemu_st(s, args, 0);
break;
@@ -1300,13 +1300,13 @@
/* reserve some stack space */
push_size = 8 + ARRAY_SIZE(tcg_target_callee_save_regs) * 8;
frame_size = push_size + TCG_STATIC_CALL_ARGS_SIZE;
- frame_size = (frame_size + TCG_TARGET_STACK_ALIGN - 1) &
+ frame_size = (frame_size + TCG_TARGET_STACK_ALIGN - 1) &
~(TCG_TARGET_STACK_ALIGN - 1);
stack_addend = frame_size - push_size;
tcg_out_addi(s, TCG_REG_RSP, -stack_addend);
tcg_out_modrm(s, 0xff, 4, TCG_REG_RDI); /* jmp *%rdi */
-
+
/* TB epilogue */
tb_ret_addr = s->code_ptr;
tcg_out_addi(s, TCG_REG_RSP, stack_addend);
@@ -1433,8 +1433,8 @@
tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I32], 0, 0xffff);
tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I64], 0, 0xffff);
tcg_regset_set32(tcg_target_call_clobber_regs, 0,
- (1 << TCG_REG_RDI) |
- (1 << TCG_REG_RSI) |
+ (1 << TCG_REG_RDI) |
+ (1 << TCG_REG_RSI) |
(1 << TCG_REG_RDX) |
(1 << TCG_REG_RCX) |
(1 << TCG_REG_R8) |
@@ -1442,7 +1442,7 @@
(1 << TCG_REG_RAX) |
(1 << TCG_REG_R10) |
(1 << TCG_REG_R11));
-
+
tcg_regset_clear(s->reserved_regs);
tcg_regset_set_reg(s->reserved_regs, TCG_REG_RSP);
diff --git a/tcg/x86_64/tcg-target.h b/tcg/x86_64/tcg-target.h
index 765f0b4..0b13054 100644
--- a/tcg/x86_64/tcg-target.h
+++ b/tcg/x86_64/tcg-target.h
@@ -51,7 +51,7 @@
#define TCG_CT_CONST_U32 0x200
/* used for function call generation */
-#define TCG_REG_CALL_STACK TCG_REG_RSP
+#define TCG_REG_CALL_STACK TCG_REG_RSP
#define TCG_TARGET_STACK_ALIGN 16
#define TCG_TARGET_CALL_STACK_OFFSET 0
diff --git a/ui/curses.c b/ui/curses.c
index 6e3c1f5..30f1e12 100644
--- a/ui/curses.c
+++ b/ui/curses.c
@@ -1,8 +1,8 @@
/*
* QEMU curses/ncurses display driver
- *
+ *
* Copyright (c) 2005 Andrzej Zaborowski <balrog@zabor.org>
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@@ -272,7 +272,7 @@
}
}
-static void curses_cleanup(void *opaque)
+static void curses_cleanup(void *opaque)
{
endwin();
}
diff --git a/ui/curses_keys.h b/ui/curses_keys.h
index a6e41cf..5f22a88 100644
--- a/ui/curses_keys.h
+++ b/ui/curses_keys.h
@@ -1,8 +1,8 @@
/*
* Keycode and keysyms conversion tables for curses
- *
+ *
* Copyright (c) 2005 Andrzej Zaborowski <balrog@zabor.org>
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
diff --git a/util/cutils.c b/util/cutils.c
index 0116fcd..185cb4d 100644
--- a/util/cutils.c
+++ b/util/cutils.c
@@ -136,7 +136,7 @@
m += 12;
y--;
}
- t = 86400ULL * (d + (153 * m - 457) / 5 + 365 * y + y / 4 - y / 100 +
+ t = 86400ULL * (d + (153 * m - 457) / 5 + 365 * y + y / 4 - y / 100 +
y / 400 - 719469);
t += 3600 * tm->tm_hour + 60 * tm->tm_min + tm->tm_sec;
return t;
diff --git a/vl-android.c b/vl-android.c
index 47e1628..238fc72 100644
--- a/vl-android.c
+++ b/vl-android.c
@@ -3686,7 +3686,7 @@
}
qemu_set_log(mask);
}
-
+
#if defined(CONFIG_KVM)
if (kvm_allowed < 0) {
kvm_allowed = kvm_check_allowed();