Chameleon

Chameleon Commit Details

Date:2012-10-27 06:11:13 (7 years 2 months ago)
Author:Evan Lojewski
Commit:2074
Parents: 2073
Message:Cleanup unneded lines in machOconv.
Changes:
M/trunk/i386/util/machOconv.c

File differences

trunk/i386/util/machOconv.c
7878
7979
8080
81
8182
8283
8384
8485
8586
87
88
8689
8790
8891
......
118121
119122
120123
121
122
123
124
125124
126125
127126
128
129
130
131
132
133
134
135
136
137
138
139
140127
141128
142129
......
155142
156143
157144
158
159145
160146
161147
......
163149
164150
165151
166
167152
168153
169154
170155
171
172156
173157
174158
perror("read mach header");
exit(1);
}
if (nc < (int)sizeof (mh))
{
fprintf(stderr, "read mach header: premature EOF %d\n", nc);
exit(1);
}
if (mh.magic == MH_MAGIC)swap_ends = false;
else if (mh.magic == MH_CIGAM)swap_ends = true;
else
#define lcp((struct load_command *)cp)
#define scp((struct segment_command *)cp)
boolisDATA;
unsignedvmsize;
unsignedvmaddr;
switch(swap(lcp->cmd))
{
case LC_SEGMENT:
isDATA = (strcmp(scp->segname, "__DATA") == 0);
if (isDATA)
{
vmaddr = swap(scp->vmaddr);
vmsize = swap(scp->filesize);
}
else
{
vmaddr = swap(scp->vmaddr);
vmsize = swap(scp->vmsize);
}
if(vmstart > swap(scp->vmaddr))
{
vmstart = swap(scp->vmaddr);
boolisDATA;
unsignedvmsize;
unsignedvmaddr;
switch(swap(lcp->cmd))
{
isDATA = (strcmp(scp->segname, "__DATA") == 0);
if (isDATA)
{
vmaddr = swap(scp->vmaddr);
vmsize = swap(scp->filesize);
}
else
{
vmaddr = swap(scp->vmaddr);
vmsize = swap(scp->vmsize);
}

Archive Download the corresponding diff file

Revision: 2074