Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
Mock Turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Mock Turtle
Commits
e085bd86
Commit
e085bd86
authored
Aug 05, 2015
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrtd:lib: fix channel range control
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
63d66e19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
libwrtd-logging.c
applications/wrtd/lib/libwrtd-logging.c
+2
-2
No files found.
applications/wrtd/lib/libwrtd-logging.c
View file @
e085bd86
...
...
@@ -120,7 +120,7 @@ static struct wrnc_hmq *wrtd_log_open(struct wrtd_node *dev,
unsigned
int
hmq_back_index
=
core
?
WRTD_OUT_FD_LOGGING
:
WRTD_OUT_TDC_LOGGING
;
if
(
channel
<
-
1
||
channel
>
n_chan
)
{
if
(
channel
<
-
1
||
channel
>
=
n_chan
)
{
errno
=
EWRTD_INVALID_CHANNEL
;
return
NULL
;
}
...
...
@@ -245,7 +245,7 @@ static int wrtd_log_level_set(struct wrtd_node *dev, unsigned int channel,
WRTD_CMD_TDC_CHAN_SET_LOG_LEVEL
;
int
n_chan
=
core
?
FD_NUM_CHANNELS
:
TDC_NUM_CHANNELS
;
if
(
channel
>
n_chan
)
{
if
(
channel
>
=
n_chan
)
{
errno
=
EWRTD_INVALID_CHANNEL
;
return
-
1
;
}
...
...
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