Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
cm-projects
RIOT
Commits
94596cdd
Commit
94596cdd
authored
9 years ago
by
Oleg Hahm
Browse files
Options
Downloads
Patches
Plain Diff
od: input parameter should be constant
parent
13b77619
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sys/include/od.h
+2
-2
2 additions, 2 deletions
sys/include/od.h
sys/od/od.c
+2
-2
2 additions, 2 deletions
sys/od/od.c
with
4 additions
and
4 deletions
sys/include/od.h
+
2
−
2
View file @
94596cdd
...
@@ -136,7 +136,7 @@ extern "C" {
...
@@ -136,7 +136,7 @@ extern "C" {
* @param[in] flags Flags as defined in @ref od_flags_address and
* @param[in] flags Flags as defined in @ref od_flags_address and
* @ref od_flags_bytes
* @ref od_flags_bytes
*/
*/
void
od
(
void
*
data
,
size_t
data_len
,
uint8_t
width
,
uint16_t
flags
);
void
od
(
const
void
*
data
,
size_t
data_len
,
uint8_t
width
,
uint16_t
flags
);
/**
/**
* @brief Dumps memory stored at *data* up to *data_len* in octal, decimal, or
* @brief Dumps memory stored at *data* up to *data_len* in octal, decimal, or
...
@@ -148,7 +148,7 @@ void od(void *data, size_t data_len, uint8_t width, uint16_t flags);
...
@@ -148,7 +148,7 @@ void od(void *data, size_t data_len, uint8_t width, uint16_t flags);
* @param[in] width Number of bytes per line. If *width* is 0,
* @param[in] width Number of bytes per line. If *width* is 0,
* @ref OD_WIDTH_DEFAULT is assumed as a default value.
* @ref OD_WIDTH_DEFAULT is assumed as a default value.
*/
*/
static
inline
void
od_hex_dump
(
void
*
data
,
size_t
data_len
,
uint8_t
width
)
static
inline
void
od_hex_dump
(
const
void
*
data
,
size_t
data_len
,
uint8_t
width
)
{
{
od
(
data
,
data_len
,
width
,
OD_FLAGS_ADDRESS_HEX
|
OD_FLAGS_BYTES_HEX
|
OD_FLAGS_LENGTH_1
);
od
(
data
,
data_len
,
width
,
OD_FLAGS_ADDRESS_HEX
|
OD_FLAGS_BYTES_HEX
|
OD_FLAGS_LENGTH_1
);
}
}
...
...
This diff is collapsed.
Click to expand it.
sys/od/od.c
+
2
−
2
View file @
94596cdd
...
@@ -178,7 +178,7 @@ static inline void _bytes_format(char *format, uint16_t flags)
...
@@ -178,7 +178,7 @@ static inline void _bytes_format(char *format, uint16_t flags)
}
}
}
}
static
void
_print_date
(
void
*
data
,
size_t
offset
,
char
*
format
,
uint8_t
length
,
static
void
_print_date
(
const
void
*
data
,
size_t
offset
,
char
*
format
,
uint8_t
length
,
uint16_t
flags
)
uint16_t
flags
)
{
{
switch
(
length
)
{
switch
(
length
)
{
...
@@ -287,7 +287,7 @@ static int _log10(uint8_t a)
...
@@ -287,7 +287,7 @@ static int _log10(uint8_t a)
return
++
res
;
return
++
res
;
}
}
void
od
(
void
*
data
,
size_t
data_len
,
uint8_t
width
,
uint16_t
flags
)
void
od
(
const
void
*
data
,
size_t
data_len
,
uint8_t
width
,
uint16_t
flags
)
{
{
char
address_format
[
5
];
char
address_format
[
5
];
uint8_t
date_length
=
_length
(
flags
);
uint8_t
date_length
=
_length
(
flags
);
...
...
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