Remove extra variable
This commit is contained in:
parent
7f977f9b2e
commit
ee47ac2a5b
1 changed files with 2 additions and 3 deletions
5
lisgd.c
5
lisgd.c
|
@ -294,12 +294,11 @@ main(int argc, char *argv[])
|
||||||
orientation = atoi(argv[++i]);
|
orientation = atoi(argv[++i]);
|
||||||
} else if (!strcmp(argv[i], "-g")) {
|
} else if (!strcmp(argv[i], "-g")) {
|
||||||
gestsarrlen++;
|
gestsarrlen++;
|
||||||
void *ptr = realloc(gestsarr, (gestsarrlen * sizeof(Gesture)));
|
gestsarr = realloc(gestsarr, (gestsarrlen * sizeof(Gesture)));
|
||||||
if ( ptr == NULL ) {
|
if (gestsarr == NULL) {
|
||||||
perror("Could not allocate memory");
|
perror("Could not allocate memory");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
gestsarr = ptr;
|
|
||||||
gestpt = strtok(argv[++i], ",");
|
gestpt = strtok(argv[++i], ",");
|
||||||
for (j = 0; gestpt != NULL && j < 3; gestpt = strtok(NULL, ","), j++) {
|
for (j = 0; gestpt != NULL && j < 3; gestpt = strtok(NULL, ","), j++) {
|
||||||
switch(j) {
|
switch(j) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue