Skip to content

Commit c2ac810

Browse files
committed
Fix compiler warning about 'misleading indentation' in the macOS USB backend code.
1 parent 2f9c2b7 commit c2ac810

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

backend/usb-darwin.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,16 +1180,16 @@ static void device_added(void *userdata, io_iterator_t iterator)
11801180
(*printerIntf)->GetInterfaceSubClass(printerIntf, &intfSubClass);
11811181
if (intfClass == kUSBPrintingInterfaceClass && intfSubClass == kUSBPrintingSubclass)
11821182
reference->keepRunning = reference->callback(intf, printerIntf, userdata);
1183-
(*printerIntf)->Release(printerIntf);
1184-
}
1185-
IOObjectRelease(intf);
1183+
(*printerIntf)->Release(printerIntf);
11861184
}
1185+
IOObjectRelease(intf);
1186+
}
11871187

1188-
if (reference->keepRunning && reference->callback)
1189-
reference->keepRunning = reference->callback(IO_OBJECT_NULL, NULL, reference->userdata);
1188+
if (reference->keepRunning && reference->callback)
1189+
reference->keepRunning = reference->callback(IO_OBJECT_NULL, NULL, reference->userdata);
11901190

1191-
if (!reference->keepRunning)
1192-
CFRunLoopStop(CFRunLoopGetCurrent());
1191+
if (!reference->keepRunning)
1192+
CFRunLoopStop(CFRunLoopGetCurrent());
11931193
}
11941194

11951195
/*
@@ -1305,14 +1305,14 @@ static Boolean find_device_cb(io_service_t obj, printer_interface_t printerIntf,
13051305
if (g.printer_obj != 0)
13061306
IOObjectRelease(g.printer_obj);
13071307

1308-
if (g.location == 0 || g.location == intfLocation)
1309-
keepLooking = false;
1308+
if (g.location == 0 || g.location == intfLocation)
1309+
keepLooking = false;
13101310

1311-
g.location = intfLocation;
1312-
g.alternateSetting = intfAltSetting;
1313-
g.interfaceProtocol = intfProtocol;
1314-
g.printer_obj = obj;
1315-
IOObjectRetain(obj);
1311+
g.location = intfLocation;
1312+
g.alternateSetting = intfAltSetting;
1313+
g.interfaceProtocol = intfProtocol;
1314+
g.printer_obj = obj;
1315+
IOObjectRetain(obj);
13161316
}
13171317

13181318
if (!keepLooking)

0 commit comments

Comments
 (0)