Update mag.c