scontrol write config fixes
I made some format changes for what I believe is better readability plus replacing spaces in some places with tabs. The xfree() function does nothing if the input value is NULL, so there is no reason to check first for a non-zero value. In slurm_write_ctl_conf(), the value tmp_str was xfreed, but not initialized. This was the only significant flaw that I saw in the code. I also restructured the code in slurm_write_ctl_conf() a bit to eliminate a redundant memory allocation and copy of tmp_str. Most of the Slurm fields are unsigned, so they should be printed using %u rather than %d.
Please register or sign in to comment