mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-31 22:25:29 -04:00
opt: Initialize all Client Pointers to NULL
This commit is contained in:
parent
a765641f4c
commit
1eb5904aa6
8 changed files with 51 additions and 52 deletions
|
|
@ -18,7 +18,7 @@ bool check_hit_no_border(Client *c) {
|
|||
return hit_no_border;
|
||||
}
|
||||
Client *termforwin(Client *w) {
|
||||
Client *c;
|
||||
Client *c = NULL;
|
||||
|
||||
if (!w->pid || w->isterm || w->noswallow)
|
||||
return NULL;
|
||||
|
|
@ -143,7 +143,7 @@ Client *center_tiled_select(Monitor *m) {
|
|||
}
|
||||
Client *find_client_by_direction(Client *tc, const Arg *arg, bool findfloating,
|
||||
bool align) {
|
||||
Client *c;
|
||||
Client *c = NULL;
|
||||
Client **tempClients = NULL; // 初始化为 NULL
|
||||
int last = -1;
|
||||
|
||||
|
|
@ -324,9 +324,8 @@ Client *direction_select(const Arg *arg) {
|
|||
/* We probably should change the name of this, it sounds like
|
||||
* will focus the topmost client of this mon, when actually will
|
||||
* only return that client */
|
||||
Client * // 0.5
|
||||
focustop(Monitor *m) {
|
||||
Client *c;
|
||||
Client *focustop(Monitor *m) {
|
||||
Client *c = NULL;
|
||||
wl_list_for_each(c, &fstack, flink) {
|
||||
if (c->iskilling || c->isunglobal)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue