1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
diff -u dxtool/dxtool.c dxtool-olly/dxtool.c
--- dxtool/dxtool.c 2013-09-29 19:27:44.000000000 +0100
+++ dxtool-olly/dxtool.c 2016-06-29 18:49:00.361742683 +0100
@@ -5,6 +5,7 @@
#include <fcntl.h>
#include <assert.h>
#include <string.h>
+#include <stdlib.h>
#define DIR_TO 0
#define DIR_FROM 1
@@ -87,7 +88,7 @@
#define INTP_READ 3
#define INTP_DEC 4
int intp = INTP_MEASUREMENT, fd, addr, c, verbose = 0;
- char ** eptr = NULL;
+ char * eptr = NULL;
unsigned char pb[8];
while((c = getopt(argc, argv, "p:s:e:mxhvrd")) != EOF)
@@ -120,7 +121,8 @@
verbose = 1;
break;
case 'p':
- assert((port = strdup(optarg)));
+ port = strdup(optarg);
+ assert(port);
break;
case 's':
s_addr = strtol(optarg, &eptr, 0);
@@ -134,7 +136,7 @@
e_addr = strtol(optarg, &eptr, 0);
if(*eptr)
{
- fprintf(stderr, "Wrong start address: %s\n", optarg);
+ fprintf(stderr, "Wrong end address: %s\n", optarg);
return 1;
}
break;
|