winedbg: Simplify the "pointer to start of array" idiom.

This commit is contained in:
Michael Stefaniuc 2012-07-27 14:09:40 +02:00 committed by Alexandre Julliard
parent f93390f719
commit 442b34415a
2 changed files with 6 additions and 6 deletions

View File

@ -1789,7 +1789,7 @@ static enum packet_return packet_query_remote_command(struct gdb_context* gdbctx
len /= 2;
hex_from(buffer, hxcmd, len);
for (qd = &query_details[0]; qd->name != NULL; qd++)
for (qd = query_details; qd->name != NULL; qd++)
{
if (len < qd->len || strncmp(buffer, qd->name, qd->len) != 0) continue;
if (!qd->with_arg && len != qd->len) continue;

View File

@ -102,7 +102,7 @@ static BOOL tgt_process_minidump_read(HANDLE hProcess, const void* addr,
MemoryListStream, NULL, &stream, NULL))
{
MINIDUMP_MEMORY_LIST* mml = stream;
MINIDUMP_MEMORY_DESCRIPTOR* mmd = &mml->MemoryRanges[0];
MINIDUMP_MEMORY_DESCRIPTOR* mmd = mml->MemoryRanges;
int i, found = -1;
SIZE_T ilen, prev_len = 0;
@ -176,7 +176,7 @@ static BOOL is_pe_module_embedded(struct tgt_process_minidump_data* data,
MINIDUMP_MODULE* mm;
unsigned i;
for (i = 0, mm = &mml->Modules[0]; i < mml->NumberOfModules; i++, mm++)
for (i = 0, mm = mml->Modules; i < mml->NumberOfModules; i++, mm++)
{
if (get_addr64(mm->BaseOfImage) <= get_addr64(pe_mm->BaseOfImage) &&
get_addr64(mm->BaseOfImage) + mm->SizeOfImage >= get_addr64(pe_mm->BaseOfImage) + pe_mm->SizeOfImage)
@ -218,7 +218,7 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
{
WCHAR* ptr;
mm = &mml->Modules[0];
mm = mml->Modules;
mds = (MINIDUMP_STRING*)((char*)data->mapping + mm->ModuleNameRva);
len = mds->Length / 2;
memcpy(exec_name, mds->Buffer, mds->Length);
@ -369,7 +369,7 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
WCHAR buffer[MAX_PATH];
mml = stream;
for (i = 0, mm = &mml->Modules[0]; i < mml->NumberOfModules; i++, mm++)
for (i = 0, mm = mml->Modules; i < mml->NumberOfModules; i++, mm++)
{
mds = (MINIDUMP_STRING*)((char*)data->mapping + mm->ModuleNameRva);
memcpy(nameW, mds->Buffer, mds->Length);
@ -388,7 +388,7 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
WCHAR buffer[MAX_PATH];
mml = stream;
for (i = 0, mm = &mml->Modules[0]; i < mml->NumberOfModules; i++, mm++)
for (i = 0, mm = mml->Modules; i < mml->NumberOfModules; i++, mm++)
{
mds = (MINIDUMP_STRING*)((char*)data->mapping + mm->ModuleNameRva);
memcpy(nameW, mds->Buffer, mds->Length);