summaryrefslogtreecommitdiffstats
path: root/tools/idevicepair.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2012-11-29 04:02:18 +0100
committerGravatar Nikias Bassen2012-11-29 04:02:18 +0100
commit14bacd927e8621d723a3d67c49f43a0485c3eff4 (patch)
tree7937869319b864201dfa5b82361b52df71cc1258 /tools/idevicepair.c
parentd28cb6b2b85bbaf97ae361aba531865e5bcaa898 (diff)
downloadlibimobiledevice-14bacd927e8621d723a3d67c49f43a0485c3eff4.tar.gz
libimobiledevice-14bacd927e8621d723a3d67c49f43a0485c3eff4.tar.bz2
tools: mass replace 'device' with 'phone' variable names
Diffstat (limited to 'tools/idevicepair.c')
-rw-r--r--tools/idevicepair.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/idevicepair.c b/tools/idevicepair.c
index 35147a4..dddb6ee 100644
--- a/tools/idevicepair.c
+++ b/tools/idevicepair.c
@@ -91,7 +91,7 @@ static void parse_opts(int argc, char **argv)
91int main(int argc, char **argv) 91int main(int argc, char **argv)
92{ 92{
93 lockdownd_client_t client = NULL; 93 lockdownd_client_t client = NULL;
94 idevice_t phone = NULL; 94 idevice_t device = NULL;
95 idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; 95 idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR;
96 lockdownd_error_t lerr; 96 lockdownd_error_t lerr;
97 int result; 97 int result;
@@ -158,7 +158,7 @@ int main(int argc, char **argv)
158 } 158 }
159 159
160 if (udid) { 160 if (udid) {
161 ret = idevice_new(&phone, udid); 161 ret = idevice_new(&device, udid);
162 free(udid); 162 free(udid);
163 udid = NULL; 163 udid = NULL;
164 if (ret != IDEVICE_E_SUCCESS) { 164 if (ret != IDEVICE_E_SUCCESS) {
@@ -166,16 +166,16 @@ int main(int argc, char **argv)
166 return EXIT_FAILURE; 166 return EXIT_FAILURE;
167 } 167 }
168 } else { 168 } else {
169 ret = idevice_new(&phone, NULL); 169 ret = idevice_new(&device, NULL);
170 if (ret != IDEVICE_E_SUCCESS) { 170 if (ret != IDEVICE_E_SUCCESS) {
171 printf("No device found, is it plugged in?\n"); 171 printf("No device found, is it plugged in?\n");
172 return EXIT_FAILURE; 172 return EXIT_FAILURE;
173 } 173 }
174 } 174 }
175 175
176 lerr = lockdownd_client_new(phone, &client, "idevicepair"); 176 lerr = lockdownd_client_new(device, &client, "idevicepair");
177 if (lerr != LOCKDOWN_E_SUCCESS) { 177 if (lerr != LOCKDOWN_E_SUCCESS) {
178 idevice_free(phone); 178 idevice_free(device);
179 printf("ERROR: lockdownd_client_new failed with error code %d\n", lerr); 179 printf("ERROR: lockdownd_client_new failed with error code %d\n", lerr);
180 return EXIT_FAILURE; 180 return EXIT_FAILURE;
181 } 181 }
@@ -196,7 +196,7 @@ int main(int argc, char **argv)
196 } 196 }
197 } 197 }
198 198
199 ret = idevice_get_udid(phone, &udid); 199 ret = idevice_get_udid(device, &udid);
200 if (ret != IDEVICE_E_SUCCESS) { 200 if (ret != IDEVICE_E_SUCCESS) {
201 printf("ERROR: Could not get device udid, error code %d\n", ret); 201 printf("ERROR: Could not get device udid, error code %d\n", ret);
202 result = EXIT_FAILURE; 202 result = EXIT_FAILURE;
@@ -254,7 +254,7 @@ int main(int argc, char **argv)
254 254
255leave: 255leave:
256 lockdownd_client_free(client); 256 lockdownd_client_free(client);
257 idevice_free(phone); 257 idevice_free(device);
258 if (udid) { 258 if (udid) {
259 free(udid); 259 free(udid);
260 } 260 }