Skip to content
Snippets Groups Projects
Commit 4985797d authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Streamlined code: we need only one check for hyper-alloc'd msg base here

No functional change.
parent b5c5630c
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4259 passed
......@@ -1938,11 +1938,12 @@ int smb_putmsghdr(smb_t* smb, smbmsg_t* msg)
,"%s writing fixed portion of header record (to delete)", __FUNCTION__);
return(SMB_ERR_WRITE);
}
if((smb->status.attr&SMB_HYPERALLOC) == 0 && (result = smb_open_ha(smb)) != SMB_SUCCESS)
if(!(smb->status.attr&SMB_HYPERALLOC)) {
if((result = smb_open_ha(smb)) != SMB_SUCCESS)
return result;
result = smb_freemsghdr(smb, old_msg.idx.offset - smb->status.header_offset, old_msg.hdr.length);
if((smb->status.attr&SMB_HYPERALLOC) == 0)
smb_close_ha(smb);
}
return result;
}
msg->hdr.length=(uint16_t)hdrlen; /* store the actual header length */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment