Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
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
Container 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
Main
Synchronet
Commits
76ca37c1
Commit
76ca37c1
authored
4 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Initialize event structs to NULs (No functional change)
parent
4458058a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/conio/x_cio.c
+11
-9
11 additions, 9 deletions
src/conio/x_cio.c
with
11 additions
and
9 deletions
src/conio/x_cio.c
+
11
−
9
View file @
76ca37c1
...
...
@@ -95,7 +95,7 @@ static void write_event(struct x11_local_event *ev)
void
x_beep
(
void
)
{
struct
x11_local_event
ev
;
struct
x11_local_event
ev
=
{
0
}
;
ev
.
type
=
X11_LOCAL_BEEP
;
write_event
(
&
ev
);
...
...
@@ -103,7 +103,7 @@ void x_beep(void)
void
x_textmode
(
int
mode
)
{
struct
x11_local_event
ev
;
struct
x11_local_event
ev
=
{
0
}
;
ev
.
type
=
X11_LOCAL_SETMODE
;
ev
.
data
.
mode
=
mode
;
...
...
@@ -113,7 +113,7 @@ void x_textmode(int mode)
void
x_setname
(
const
char
*
name
)
{
struct
x11_local_event
ev
;
struct
x11_local_event
ev
=
{
0
}
;
ev
.
type
=
X11_LOCAL_SETNAME
;
SAFECOPY
(
ev
.
data
.
name
,
name
);
...
...
@@ -122,7 +122,7 @@ void x_setname(const char *name)
void
x_settitle
(
const
char
*
title
)
{
struct
x11_local_event
ev
;
struct
x11_local_event
ev
=
{
0
}
;
ev
.
type
=
X11_LOCAL_SETTITLE
;
SAFECOPY
(
ev
.
data
.
title
,
title
);
...
...
@@ -132,7 +132,7 @@ void x_settitle(const char *title)
void
x_seticon
(
const
void
*
icon
,
unsigned
long
size
)
{
const
uint32_t
*
icon32
=
icon
;
struct
x11_local_event
ev
;
struct
x11_local_event
ev
=
{
0
}
;
int
i
;
ev
.
data
.
icon_data
=
malloc
((
size
*
size
+
2
)
*
sizeof
(
ev
.
data
.
icon_data
[
0
]));
...
...
@@ -148,7 +148,7 @@ void x_seticon(const void *icon, unsigned long size)
void
x_copytext
(
const
char
*
text
,
size_t
buflen
)
{
struct
x11_local_event
ev
;
struct
x11_local_event
ev
=
{
0
}
;
pthread_mutex_lock
(
&
copybuf_mutex
);
FREE_AND_NULL
(
copybuf
);
...
...
@@ -166,7 +166,7 @@ void x_copytext(const char *text, size_t buflen)
char
*
x_getcliptext
(
void
)
{
char
*
ret
=
NULL
;
struct
x11_local_event
ev
;
struct
x11_local_event
ev
=
{
0
}
;
ev
.
type
=
X11_LOCAL_PASTE
;
write_event
(
&
ev
);
...
...
@@ -500,7 +500,7 @@ int x_init(void)
void
x11_drawrect
(
struct
rectlist
*
data
)
{
struct
x11_local_event
ev
;
struct
x11_local_event
ev
=
{
0
}
;
ev
.
type
=
X11_LOCAL_DRAWRECT
;
if
(
x11_initialized
)
{
...
...
@@ -511,7 +511,7 @@ void x11_drawrect(struct rectlist *data)
void
x11_flush
(
void
)
{
struct
x11_local_event
ev
;
struct
x11_local_event
ev
=
{
0
}
;
ev
.
type
=
X11_LOCAL_FLUSH
;
if
(
x11_initialized
)
...
...
@@ -520,6 +520,8 @@ void x11_flush(void)
void
x_setscaling
(
int
newval
)
{
if
(
newval
<
1
)
newval
=
1
;
pthread_mutex_lock
(
&
vstatlock
);
x_cvstat
.
scaling
=
vstat
.
scaling
=
newval
;
pthread_mutex_unlock
(
&
vstatlock
);
...
...
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