From a7232424c25a105ba78fb378db4b4db9e72afc4a Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Wed, 11 Sep 2013 12:25:23 +0200 Subject: filerelaytest: Variable can not be declared inside for loop on non C99 mode --- dev/filerelaytest.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'dev') 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) lockdownd_client_t client = NULL; lockdownd_service_descriptor_t service = NULL; file_relay_client_t frc = NULL; + idevice_connection_t dump = NULL; + const char **sources; + const char *default_sources[] = {"AppleSupport", "Network", "VPN", "WiFi", "UserDatabases", "CrashReporter", "tmp", "SystemConfiguration", NULL}; + int i = 0; if (idevice_new(&dev, NULL) != IDEVICE_E_SUCCESS) { printf("no device connected?!\n"); @@ -62,15 +66,11 @@ int main(int argc, char **argv) service = NULL; } - idevice_connection_t dump = NULL; - const char **sources; - const char *default_sources[] = {"AppleSupport", "Network", "VPN", "WiFi", "UserDatabases", "CrashReporter", "tmp", "SystemConfiguration", NULL}; - if (argc > 1) { sources = calloc(1, argc * sizeof(char *)); argc--; argv++; - for (int i = 0; i < argc; i++) { + for (i = 0; i < argc; i++) { sources[i] = argv[i]; } } @@ -79,7 +79,7 @@ int main(int argc, char **argv) } printf("Requesting"); - int i = 0; + i = 0; while (sources[i]) { printf(" %s", sources[i]); i++; -- cgit v1.1-32-gdbae