It's safe to access setting[0] without checking the length first? What makes it redundant - the check in antminer_set_device? If so I'll move that to antminer_set_clock for clarity.