Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
slurm.32296
U_20-Move-in-a-tab-stop.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File U_20-Move-in-a-tab-stop.patch of Package slurm.32296
From: Tim Wickberg <tim@schedmd.com> Date: Wed Nov 29 15:38:16 2023 -0700 Subject: [PATCH 20/28]Move in a tab stop. Patch-mainline: Upstream Git-repo: https://github.com/SchedMD/slurm Git-commit: b831e0ae5e501bcaf39672fdb425043ef430cbc2 References: bsc#1218046, bsc#1218050, bsc#1218051, bsc#1218053 Signed-off-by: Egbert Eich <eich@suse.de> --- src/common/pack.c | 48 +++++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/src/common/pack.c b/src/common/pack.c index b5131a6afb..f4afc37051 100644 --- a/src/common/pack.c +++ b/src/common/pack.c @@ -872,12 +872,12 @@ int unpackmem_ptr(char **valp, uint32_t * size_valp, Buf buffer) __func__, *size_valp, MAX_ARRAY_LEN_LARGE); return SLURM_ERROR; } - else if (*size_valp > 0) { - if (remaining_buf(buffer) < *size_valp) - return SLURM_ERROR; - *valp = &buffer->head[buffer->processed]; - buffer->processed += *size_valp; - } + + if (remaining_buf(buffer) < *size_valp) + return SLURM_ERROR; + *valp = &buffer->head[buffer->processed]; + buffer->processed += *size_valp; + return SLURM_SUCCESS; unpack_error: @@ -906,14 +906,13 @@ int unpackmem_xmalloc(char **valp, uint32_t * size_valp, Buf buffer) __func__, *size_valp, MAX_ARRAY_LEN_LARGE); return SLURM_ERROR; } - else if (*size_valp > 0) { - if (remaining_buf(buffer) < *size_valp) - return SLURM_ERROR; - *valp = xmalloc_nz(*size_valp); - memcpy(*valp, &buffer->head[buffer->processed], - *size_valp); - buffer->processed += *size_valp; - } + + if (remaining_buf(buffer) < *size_valp) + return SLURM_ERROR; + *valp = xmalloc_nz(*size_valp); + memcpy(*valp, &buffer->head[buffer->processed], *size_valp); + buffer->processed += *size_valp; + return SLURM_SUCCESS; unpack_error: @@ -942,18 +941,17 @@ int unpackmem_malloc(char **valp, uint32_t * size_valp, Buf buffer) __func__, *size_valp, MAX_ARRAY_LEN_SMALL); return SLURM_ERROR; } - else if (*size_valp > 0) { - if (remaining_buf(buffer) < *size_valp) - return SLURM_ERROR; - *valp = malloc(*size_valp); - if (*valp == NULL) { - log_oom(__FILE__, __LINE__, __func__); - abort(); - } - memcpy(*valp, &buffer->head[buffer->processed], - *size_valp); - buffer->processed += *size_valp; + + if (remaining_buf(buffer) < *size_valp) + return SLURM_ERROR; + *valp = malloc(*size_valp); + if (*valp == NULL) { + log_oom(__FILE__, __LINE__, __func__); + abort(); } + memcpy(*valp, &buffer->head[buffer->processed], *size_valp); + buffer->processed += *size_valp; + return SLURM_SUCCESS; unpack_error:
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor