diff options
Diffstat (limited to 'tools/ideviceenterrecovery.c')
| -rw-r--r-- | tools/ideviceenterrecovery.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/ideviceenterrecovery.c b/tools/ideviceenterrecovery.c index fc46e75..62df70f 100644 --- a/tools/ideviceenterrecovery.c +++ b/tools/ideviceenterrecovery.c | |||
| @@ -45,8 +45,7 @@ int main(int argc, char *argv[]) | |||
| 45 | idevice_t phone = NULL; | 45 | idevice_t phone = NULL; |
| 46 | idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; | 46 | idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; |
| 47 | int i; | 47 | int i; |
| 48 | char udid[41]; | 48 | const char* udid = NULL; |
| 49 | udid[0] = 0; | ||
| 50 | 49 | ||
| 51 | /* parse cmdline args */ | 50 | /* parse cmdline args */ |
| 52 | for (i = 1; i < argc; i++) { | 51 | for (i = 1; i < argc; i++) { |
| @@ -65,7 +64,7 @@ int main(int argc, char *argv[]) | |||
| 65 | print_usage(argc, argv); | 64 | print_usage(argc, argv); |
| 66 | return 0; | 65 | return 0; |
| 67 | } | 66 | } |
| 68 | strcpy(udid, argv[i]); | 67 | udid = argv[i]; |
| 69 | 68 | ||
| 70 | ret = idevice_new(&phone, udid); | 69 | ret = idevice_new(&phone, udid); |
| 71 | if (ret != IDEVICE_E_SUCCESS) { | 70 | if (ret != IDEVICE_E_SUCCESS) { |
