summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-09-11 12:25:23 +0200
committerGravatar Martin Szulecki2013-09-11 12:25:23 +0200
commita7232424c25a105ba78fb378db4b4db9e72afc4a (patch)
treee9ed6a7c87f5e37e3ba4513e2b7e5f0795d60004
parent3e5a7290e79779321cd8901bbd5091a5ea7132f6 (diff)
downloadlibimobiledevice-a7232424c25a105ba78fb378db4b4db9e72afc4a.tar.gz
libimobiledevice-a7232424c25a105ba78fb378db4b4db9e72afc4a.tar.bz2
filerelaytest: Variable can not be declared inside for loop on non C99 mode
-rw-r--r--dev/filerelaytest.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/dev/filerelaytest.c b/dev/filerelaytest.c
index 0f2f117..b19bbd7 100644
--- a/dev/filerelaytest.c
+++ b/dev/filerelaytest.c
@@ -30,6 +30,10 @@ int main(int argc, char **argv)
30 lockdownd_client_t client = NULL; 30 lockdownd_client_t client = NULL;
31 lockdownd_service_descriptor_t service = NULL; 31 lockdownd_service_descriptor_t service = NULL;
32 file_relay_client_t frc = NULL; 32 file_relay_client_t frc = NULL;
33 idevice_connection_t dump = NULL;
34 const char **sources;
35 const char *default_sources[] = {"AppleSupport", "Network", "VPN", "WiFi", "UserDatabases", "CrashReporter", "tmp", "SystemConfiguration", NULL};
36 int i = 0;
33 37
34 if (idevice_new(&dev, NULL) != IDEVICE_E_SUCCESS) { 38 if (idevice_new(&dev, NULL) != IDEVICE_E_SUCCESS) {
35 printf("no device connected?!\n"); 39 printf("no device connected?!\n");
@@ -62,15 +66,11 @@ int main(int argc, char **argv)
62 service = NULL; 66 service = NULL;
63 } 67 }
64 68
65 idevice_connection_t dump = NULL;
66 const char **sources;
67 const char *default_sources[] = {"AppleSupport", "Network", "VPN", "WiFi", "UserDatabases", "CrashReporter", "tmp", "SystemConfiguration", NULL};
68
69 if (argc > 1) { 69 if (argc > 1) {
70 sources = calloc(1, argc * sizeof(char *)); 70 sources = calloc(1, argc * sizeof(char *));
71 argc--; 71 argc--;
72 argv++; 72 argv++;
73 for (int i = 0; i < argc; i++) { 73 for (i = 0; i < argc; i++) {
74 sources[i] = argv[i]; 74 sources[i] = argv[i];
75 } 75 }
76 } 76 }
@@ -79,7 +79,7 @@ int main(int argc, char **argv)
79 } 79 }
80 80
81 printf("Requesting"); 81 printf("Requesting");
82 int i = 0; 82 i = 0;
83 while (sources[i]) { 83 while (sources[i]) {
84 printf(" %s", sources[i]); 84 printf(" %s", sources[i]);
85 i++; 85 i++;