Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:Update
slurm
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
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: 617de23df47503b0153ab19a3485a0876a15cb34 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 f865779986..fd6d2fdaa9 100644 --- a/src/common/pack.c +++ b/src/common/pack.c @@ -862,12 +862,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: @@ -931,14 +931,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: @@ -967,18 +966,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