Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alex037yang
OpenXG-RAN
Commits
b04a448b
Commit
b04a448b
authored
May 10, 2016
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix: calloc arguments' wrong order
parent
497c64a9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
common/utils/T/tracer/gui/xy_plot.c
common/utils/T/tracer/gui/xy_plot.c
+2
-2
common/utils/T/tracer/logger/framelog.c
common/utils/T/tracer/logger/framelog.c
+2
-2
common/utils/T/tracer/view/xy.c
common/utils/T/tracer/view/xy.c
+4
-4
No files found.
common/utils/T/tracer/gui/xy_plot.c
View file @
b04a448b
...
@@ -258,8 +258,8 @@ void xy_plot_set_points(gui *_gui, widget *_this, int plot,
...
@@ -258,8 +258,8 @@ void xy_plot_set_points(gui *_gui, widget *_this, int plot,
if
(
npoints
!=
this
->
plots
[
plot
].
npoints
)
{
if
(
npoints
!=
this
->
plots
[
plot
].
npoints
)
{
free
(
this
->
plots
[
plot
].
x
);
free
(
this
->
plots
[
plot
].
x
);
free
(
this
->
plots
[
plot
].
y
);
free
(
this
->
plots
[
plot
].
y
);
this
->
plots
[
plot
].
x
=
calloc
(
sizeof
(
float
),
npoints
);
this
->
plots
[
plot
].
x
=
calloc
(
npoints
,
sizeof
(
float
)
);
this
->
plots
[
plot
].
y
=
calloc
(
sizeof
(
float
),
npoints
);
this
->
plots
[
plot
].
y
=
calloc
(
npoints
,
sizeof
(
float
)
);
this
->
plots
[
plot
].
npoints
=
npoints
;
this
->
plots
[
plot
].
npoints
=
npoints
;
}
}
...
...
common/utils/T/tracer/logger/framelog.c
View file @
b04a448b
...
@@ -39,9 +39,9 @@ static void _event(void *p, event e)
...
@@ -39,9 +39,9 @@ static void _event(void *p, event e)
l
->
blength
=
nsamples
*
10
;
l
->
blength
=
nsamples
*
10
;
free
(
l
->
x
);
free
(
l
->
x
);
free
(
l
->
buffer
);
free
(
l
->
buffer
);
l
->
x
=
calloc
(
sizeof
(
float
),
l
->
blength
);
l
->
x
=
calloc
(
l
->
blength
,
sizeof
(
float
)
);
if
(
l
->
x
==
NULL
)
abort
();
if
(
l
->
x
==
NULL
)
abort
();
l
->
buffer
=
calloc
(
sizeof
(
float
),
l
->
blength
);
l
->
buffer
=
calloc
(
l
->
blength
,
sizeof
(
float
)
);
if
(
l
->
buffer
==
NULL
)
abort
();
if
(
l
->
buffer
==
NULL
)
abort
();
/* update 'x' */
/* update 'x' */
for
(
i
=
0
;
i
<
l
->
blength
;
i
++
)
for
(
i
=
0
;
i
<
l
->
blength
;
i
++
)
...
...
common/utils/T/tracer/view/xy.c
View file @
b04a448b
...
@@ -74,8 +74,8 @@ static void set(view *_this, char *name, ...)
...
@@ -74,8 +74,8 @@ static void set(view *_this, char *name, ...)
free
(
this
->
x
);
free
(
this
->
x
);
free
(
this
->
y
);
free
(
this
->
y
);
this
->
length
=
va_arg
(
ap
,
int
);
this
->
length
=
va_arg
(
ap
,
int
);
this
->
x
=
calloc
(
sizeof
(
float
),
this
->
length
);
if
(
this
->
x
==
NULL
)
abort
();
this
->
x
=
calloc
(
this
->
length
,
sizeof
(
float
)
);
if
(
this
->
x
==
NULL
)
abort
();
this
->
y
=
calloc
(
sizeof
(
float
),
this
->
length
);
if
(
this
->
y
==
NULL
)
abort
();
this
->
y
=
calloc
(
this
->
length
,
sizeof
(
float
)
);
if
(
this
->
y
==
NULL
)
abort
();
this
->
insert_point
=
0
;
this
->
insert_point
=
0
;
va_end
(
ap
);
va_end
(
ap
);
...
@@ -104,8 +104,8 @@ view *new_view_xy(int length, float refresh_rate, gui *g, widget *w,
...
@@ -104,8 +104,8 @@ view *new_view_xy(int length, float refresh_rate, gui *g, widget *w,
ret
->
plot
=
xy_plot_new_plot
(
g
,
w
,
color
);
ret
->
plot
=
xy_plot_new_plot
(
g
,
w
,
color
);
ret
->
length
=
length
;
ret
->
length
=
length
;
ret
->
x
=
calloc
(
sizeof
(
float
),
length
);
if
(
ret
->
x
==
NULL
)
abort
();
ret
->
x
=
calloc
(
length
,
sizeof
(
float
)
);
if
(
ret
->
x
==
NULL
)
abort
();
ret
->
y
=
calloc
(
sizeof
(
float
),
length
);
if
(
ret
->
y
==
NULL
)
abort
();
ret
->
y
=
calloc
(
length
,
sizeof
(
float
)
);
if
(
ret
->
y
==
NULL
)
abort
();
ret
->
insert_point
=
0
;
ret
->
insert_point
=
0
;
if
(
pthread_mutex_init
(
&
ret
->
lock
,
NULL
))
abort
();
if
(
pthread_mutex_init
(
&
ret
->
lock
,
NULL
))
abort
();
...
...
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