Ticket 198

Summary: Removed malloc error logic in several files
Product: Slurm Reporter: Nathan Yee <nyee32>
Component: OtherAssignee: Moe Jette <jette>
Status: RESOLVED FIXED QA Contact:
Severity: 5 - Enhancement    
Priority: --- CC: da
Version: 2.4.x   
Hardware: Linux   
OS: Linux   
Site: SchedMD Alineos Sites: ---
Atos/Eviden Sites: --- Confidential Site: ---
Coreweave sites: --- Cray Sites: ---
DS9 clusters: --- HPCnow Sites: ---
HPE Sites: --- IBM Sites: ---
NOAA SIte: --- OCF Sites: ---
Recursion Pharma Sites: --- SFW Sites: ---
SNIC sites: --- Linux Distro: ---
Machine Name: CLE Version:
Version Fixed: Target Release: ---
DevPrio: --- Emory-Cloud Sites: ---
Attachments: Removed all the malloc error logic in multiple files

Description Nathan Yee 2013-01-07 10:52:46 MST
Created attachment 170 [details]
Removed all the malloc error logic in multiple files
Comment 1 Moe Jette 2013-01-08 05:01:39 MST
I found four problems, all similar. Here's a C lesson for you:

	if (!(job_resrcs_ptr->node_bitmap = bit_copy(bitmap)))
		fatal("bit_copy malloc failure");

Is equivalent to:

	job_resrcs_ptr->node_bitmap = bit_copy(bitmap);
	if (!job_resrcs_ptr->node_bitmap)
		fatal("bit_copy malloc failure");

It is just compressed to save some space and perhaps make the logic more clear. So rather than remove the 2 lines in the first example complete, it needed to be change to:

	job_resrcs_ptr->node_bitmap = bit_copy(bitmap);