Skip to content

Commit f3751ea

Browse files
Betty style corrected on 100
1 parent 6532ec6 commit f3751ea

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

0x0F-function_pointers/100-main_opcodes.c

+22-22
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@
99
*/
1010
int main(int argc, char *argv[])
1111
{
12-
int bytes, i;
13-
unsigned char *func_ptr;
12+
int bytes, i;
13+
unsigned char *func_ptr;
1414

15-
if (argc != 2)
16-
{
17-
printf("Error\n");
18-
exit(1);
19-
}
20-
bytes = atoi(argv[1]);
21-
if (bytes < 0)
22-
{
23-
printf("Error\n");
24-
exit(2);
25-
}
26-
func_ptr = (unsigned char *)main;
27-
i = 0;
28-
if (bytes > 0)
29-
{
30-
while (i < (bytes - 1))
31-
printf("%02hhx ", func_ptr[i++]);
32-
printf("%hhx\n", func_ptr[i]);
33-
}
34-
return (0);
15+
if (argc != 2)
16+
{
17+
printf("Error\n");
18+
exit(1);
19+
}
20+
bytes = atoi(argv[1]);
21+
if (bytes < 0)
22+
{
23+
printf("Error\n");
24+
exit(2);
25+
}
26+
func_ptr = (unsigned char *)main;
27+
i = 0;
28+
if (bytes > 0)
29+
{
30+
while (i < (bytes - 1))
31+
printf("%02hhx ", func_ptr[i++]);
32+
printf("%hhx\n", func_ptr[i]);
33+
}
34+
return (0);
3535
}

0 commit comments

Comments
 (0)