Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
4d778f25
Commit
4d778f25
authored
Mar 28, 2023
by
Adam Wujek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/snmpd: move function int_saturate to init.c
Signed-off-by:
Adam Wujek
<
dev_public@wujek.eu
>
parent
5846b6a1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
20 deletions
+11
-20
init.c
userspace/snmpd/init.c
+10
-0
wrsDiskTable.c
userspace/snmpd/wrsDiskTable.c
+0
-10
wrsPtpDataTable.c
userspace/snmpd/wrsPtpDataTable.c
+0
-10
wrsSnmp.h
userspace/snmpd/wrsSnmp.h
+1
-0
No files found.
userspace/snmpd/init.c
View file @
4d778f25
...
...
@@ -71,3 +71,13 @@ void init_wrsSnmp(void)
/* BRIDGE-MIB and Q-BRIDGE-MIB */
init_bridge_mib
();
}
int32_t
int_saturate
(
int64_t
value
)
{
if
(
value
>=
INT32_MAX
)
return
INT32_MAX
;
else
if
(
value
<=
INT32_MIN
)
return
INT32_MIN
;
return
value
;
}
userspace/snmpd/wrsDiskTable.c
View file @
4d778f25
...
...
@@ -17,16 +17,6 @@ static struct pickinfo wrsDiskTable_pickinfo[] = {
FIELD
(
wrsDiskTable_s
,
ASN_OCTET_STR
,
wrsDiskFilesystem
),
};
static
int32_t
int_saturate
(
int64_t
value
)
{
if
(
value
>=
INT32_MAX
)
return
INT32_MAX
;
else
if
(
value
<=
INT32_MIN
)
return
INT32_MIN
;
return
value
;
}
time_t
wrsDiskTable_data_fill
(
unsigned
int
*
ret_n_rows
)
{
static
time_t
time_update
;
...
...
userspace/snmpd/wrsPtpDataTable.c
View file @
4d778f25
...
...
@@ -33,16 +33,6 @@ static struct pickinfo wrsPtpDataTable_pickinfo[] = {
};
static
int32_t
int_saturate
(
int64_t
value
)
{
if
(
value
>=
INT32_MAX
)
return
INT32_MAX
;
else
if
(
value
<=
INT32_MIN
)
return
INT32_MIN
;
return
value
;
}
time_t
wrsPtpDataTable_data_fill
(
unsigned
int
*
n_rows
)
{
unsigned
ii
;
...
...
userspace/snmpd/wrsSnmp.h
View file @
4d778f25
...
...
@@ -112,5 +112,6 @@ struct pickinfo {
#define SL_INFO "Info "
#define SL_DEBUG "DEBUG "
int32_t
int_saturate
(
int64_t
value
);
#endif
/* WRS_SNMP_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment