Commit 9cabcea2 authored by Morris Jette's avatar Morris Jette
Browse files

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.
parent 55766c11
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment