Commit 19c9d083 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

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

parent 93185287
......@@ -500,7 +500,7 @@ static const char *get_coff_name( const IMAGE_SYMBOL *coff_sym, const char *coff
{
memcpy(namebuff, coff_sym->N.ShortName, 8);
namebuff[8] = '\0';
nampnt = &namebuff[0];
nampnt = namebuff;
}
else
{
......
......@@ -102,7 +102,7 @@ void mdmp_dump(void)
case ThreadListStream:
{
const MINIDUMP_THREAD_LIST* mtl = (const MINIDUMP_THREAD_LIST*)stream;
const MINIDUMP_THREAD* mt = &mtl->Threads[0];
const MINIDUMP_THREAD* mt = mtl->Threads;
unsigned int i;
printf("Threads: %u\n", mtl->NumberOfThreads);
......@@ -129,7 +129,7 @@ void mdmp_dump(void)
case 0xFFF0:
{
const MINIDUMP_MODULE_LIST* mml = (const MINIDUMP_MODULE_LIST*)stream;
const MINIDUMP_MODULE* mm = &mml->Modules[0];
const MINIDUMP_MODULE* mm = mml->Modules;
unsigned int i;
const char* p1;
const char* p2;
......@@ -224,7 +224,7 @@ void mdmp_dump(void)
case MemoryListStream:
{
const MINIDUMP_MEMORY_LIST* mml = (const MINIDUMP_MEMORY_LIST*)stream;
const MINIDUMP_MEMORY_DESCRIPTOR* mmd = &mml->MemoryRanges[0];
const MINIDUMP_MEMORY_DESCRIPTOR* mmd = mml->MemoryRanges;
unsigned int i;
printf("Memory Ranges: %u\n", mml->NumberOfMemoryRanges);
......@@ -333,7 +333,7 @@ void mdmp_dump(void)
if (msi->ProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL)
{
printf(" x86.VendorId: %.12s\n",
(const char*)&msi->Cpu.X86CpuInfo.VendorId[0]);
(const char*)msi->Cpu.X86CpuInfo.VendorId);
printf(" x86.VersionInformation: %x\n",
msi->Cpu.X86CpuInfo.VersionInformation);
printf(" x86.FeatureInformation: %x\n",
......
......@@ -174,12 +174,12 @@ static unsigned get_stream_by_name(struct pdb_reader* reader, const char* name)
if (reader->read_file == pdb_jg_read_file)
{
str = &reader->u.jg.root->names[0];
str = reader->u.jg.root->names;
cbstr = reader->u.jg.root->cbNames;
}
else
{
str = &reader->u.ds.root->names[0];
str = reader->u.ds.root->names;
cbstr = reader->u.ds.root->cbNames;
}
......@@ -740,7 +740,7 @@ static void pdb_jg_dump(void)
reader.u.jg.root->Age,
(unsigned)reader.u.jg.root->cbNames);
pdw = (DWORD*)(&reader.u.jg.root->names[0] + reader.u.jg.root->cbNames);
pdw = (DWORD*)(reader.u.jg.root->names + reader.u.jg.root->cbNames);
numok = *pdw++;
count = *pdw++;
printf("\tStreams directory:\n"
......@@ -895,7 +895,7 @@ static void pdb_ds_dump(void)
reader.u.ds.root->Age,
get_guid_str(&reader.u.ds.root->guid),
reader.u.ds.root->cbNames);
pdw = (DWORD*)(&reader.u.ds.root->names[0] + reader.u.ds.root->cbNames);
pdw = (DWORD*)(reader.u.ds.root->names + reader.u.ds.root->cbNames);
numok = *pdw++;
count = *pdw++;
printf("\tStreams directory:\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment