Hysteresis in superconducting short weak links and μ -SQUIDs