Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scord
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eu
ADMIRE
scord
Commits
917e6a9b
Verified
Commit
917e6a9b
authored
2 years ago
by
Alberto Miranda
♨️
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup types.c
parent
92cda2c8
No related branches found
No related tags found
1 merge request
!80
Resolve "Refactor api/rpc_types.[c|h]"
Pipeline
#3522
failed
2 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lib/types.c
+13
-34
13 additions, 34 deletions
src/lib/types.c
with
13 additions
and
34 deletions
src/lib/types.c
+
13
−
34
View file @
917e6a9b
...
...
@@ -23,13 +23,14 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*****************************************************************************/
#include
<stdio.h>
#include
<assert.h>
#include
<string.h>
#include
<logger/logger.h>
#include
"scord/types.h"
#include
"types_private.h"
#define maybe_unused __attribute__((unused))
/******************************************************************************/
/* C Type definitions and related functions */
/******************************************************************************/
...
...
@@ -157,9 +158,7 @@ cleanup_on_error:
}
free
(
p
);
if
(
error_msg
)
{
LOGGER_ERROR
(
error_msg
);
}
LOGGER_ERROR
(
error_msg
);
return
NULL
;
}
...
...
@@ -401,9 +400,7 @@ cleanup_on_error:
}
free
(
p
);
if
(
error_msg
)
{
LOGGER_ERROR
(
error_msg
);
}
LOGGER_ERROR
(
error_msg
);
return
NULL
;
}
...
...
@@ -472,11 +469,9 @@ ADM_adhoc_storage_create(const char* name, ADM_adhoc_storage_type_t type,
return
adm_adhoc_storage
;
cleanup_on_error:
if
(
error_msg
)
{
LOGGER_ERROR
(
error_msg
);
}
LOGGER_ERROR
(
error_msg
);
[[
maybe_unused
]]
ADM_return_t
ret
=
maybe_unused
ADM_return_t
ret
=
ADM_adhoc_storage_destroy
(
adm_adhoc_storage
);
assert
(
ret
);
...
...
@@ -531,9 +526,7 @@ ADM_adhoc_resources_create(ADM_node_t nodes[], size_t nodes_len) {
return
adm_adhoc_resources
;
cleanup_on_error:
if
(
error_msg
)
{
LOGGER_ERROR
(
error_msg
);
}
LOGGER_ERROR
(
error_msg
);
if
(
adm_adhoc_resources
)
{
ADM_adhoc_resources_destroy
(
adm_adhoc_resources
);
...
...
@@ -601,12 +594,9 @@ ADM_pfs_storage_create(const char* name, ADM_pfs_storage_type_t type,
return
adm_pfs_storage
;
cleanup_on_error:
if
(
error_msg
)
{
LOGGER_ERROR
(
error_msg
);
}
LOGGER_ERROR
(
error_msg
);
[[
maybe_unused
]]
ADM_return_t
ret
=
ADM_pfs_storage_destroy
(
adm_pfs_storage
);
maybe_unused
ADM_return_t
ret
=
ADM_pfs_storage_destroy
(
adm_pfs_storage
);
assert
(
ret
);
return
NULL
;
...
...
@@ -759,9 +749,7 @@ ADM_job_resources_create(ADM_node_t nodes[], size_t nodes_len) {
return
adm_job_resources
;
cleanup_on_error:
if
(
error_msg
)
{
LOGGER_ERROR
(
error_msg
);
}
LOGGER_ERROR
(
error_msg
);
if
(
adm_job_resources
)
{
ADM_job_resources_destroy
(
adm_job_resources
);
...
...
@@ -843,15 +831,8 @@ ADM_job_requirements_create(ADM_dataset_t inputs[], size_t inputs_len,
return
adm_job_reqs
;
cleanup_on_error:
if
(
error_msg
)
{
LOGGER_ERROR
(
error_msg
);
}
if
(
adm_job_reqs
)
{
ADM_job_requirements_destroy
(
adm_job_reqs
);
}
LOGGER_ERROR
(
error_msg
);
ADM_job_requirements_destroy
(
adm_job_reqs
);
return
NULL
;
}
...
...
@@ -1009,9 +990,7 @@ cleanup_on_error:
}
free
(
p
);
if
(
error_msg
)
{
LOGGER_ERROR
(
error_msg
);
}
LOGGER_ERROR
(
error_msg
);
return
NULL
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment