a memset(sysv, 0, sizeof(sysvmq_t)) might be safer, that way if the struct changes all the members are still initialized to sane defaults.