Commit Graph

19583 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
64bdd50790 (1623) xkb: XkbWriteKeyActions(): only pass in the needed data
We don't need the whole struct here, especially do we not wanna change it.
Therefore only pass in what's really needed, so it gets easier to understand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:13 +01:00
Enrico Weigelt, metux IT consult
2edccfa8c8 (1623) xkb: XkbWriteKeyTypes(): only pass in the needed data
We don't need the whole struct here, especially do we not wanna change it.
Therefore only pass in what's really needed, so it gets easier to understand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:13 +01:00
Enrico Weigelt, metux IT consult
05fcbe206d (1623) xkb: XkbWriteKeySyms(): only pass in the needed data
We don't need the whole struct here, especially do we not wanna change it.
Therefore only pass in what's really needed, so it gets easier to understand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
dfdecf3ae9 (1623) xkb: SProcXkbSelectEvents(): simplify swapping
The swapping logic isn't entirely trivial to understand and can be
simplified.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
beb4e1601f (1623) xkb: simplify reply struct initialization
Use static initializaton as much as possible and drop unnecessary
or duplicate zero assignments.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
55d621de6d (1823) (1823) os.h: drop obsolete xallocarray()
This macro isn't used anywhere (also not in drivers), so no need
to keep it around any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
b685c596f9 (1823) panoramix: protect against allocaton failure
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
b2c7db0acd (1823) xwayland: protect from memory allocation failure
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
49261ef939 (1823) xwayland: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
bc038470a7 (1823) xnest: protect from memory allocation failure
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
d20f5f8316 (1823) xnest: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
5ec79124b3 (1823) xfree86: protect from memory allocation failure
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
afd8a05636 (1823) xfree86: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
dabedf28f7 (1823) xvfb: protect from memory allocation failure
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
c2096fb0f2 (1823) xvfb: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
e936ab13f4 (1823) kdrive: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
1c121e23b5 (1823) xkb: protect from memory allocation failure
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
34d56181b8 (1823) xkb: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
c2a04d0d6d (1823) xfixes: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
f3600e559f (1823) render: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
d432255cd1 (1823) record: protect from memory allocation failure
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
e6ef22fce0 (1823) record: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
8f5789c251 (1823) randr: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
3a0437ffa2 (1823) os: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
88e693c843 (1823) miext: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
32ec9f2786 (1823) mi: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
1a419aa1b2 (1823) glamor: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
30df55528b (1823) fb: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
8f98a4182c (1823) exa: protect from allocation failure
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
a1a8ad0ff5 (1823) exa: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
5a545d6c01 (1823) dix: protect from allocation failure
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
c64bae2b82 (1823) dix: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
d76107d382 (1823) dbe: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
6271bf035b (1823) xi: protect from allocation failure
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
582c2e47ee (1823) xi: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
79ff1031be (1823) xext: xres: protect from allocation failure
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
67097b63ee (1823) xext: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.

Cocci rule:

    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
99a7cba7ba (1825) os: move LIMITCLIENTS define into private header
Not used by any external modules, and an implementation
detail anyways, so no need to keep it in public header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
6f83b70d51 (1826) include: misc: drop unused defines
USE_BACKGROUND_PIXEL and USE_BORDER_PIXEL aren't used anywhere,
neither in Xserver nor any drivers, so can be dropped now.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
430ff64126 (1827) xwin: drop redundant declaration of winValidateArgs()
../hw/xwin/InitOutput.c:89:2: warning: redundant redeclaration of ‘winValidateArgs’ [-Wredundant-decls]
   89 |  winValidateArgs(void);
      |  ^~~~~~~~~~~~~~~

In file included from ../hw/xwin/InitOutput.c:35:
../hw/xwin/win.h:1008:1: note: previous declaration of ‘winValidateArgs’ was here

 1008 | winValidateArgs(void);
      | ^~~~~~~~~~~~~~~

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
a8b9fa10c9 (1829) xfixes: clean up including panoramix headers
* use their actual path instead of relying this to be in compiler's
  include path list.
* no need to do it only conditionally, no #ifdef needed

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
101412dcb2 (1829) render: clean up including panoramix headers
* use their actual path instead of relying this to be in compiler's
  include path list.
* no need to do it only conditionally, no #ifdef needed

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
b9db1f653f (1829) mi: clean up including panoramix headers
* use their actual path instead of relying this to be in compiler's
  include path list.
* no need to do it only conditionally, no #ifdef needed

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
8ae813869d (1829) record: clean up including panoramix headers
* use their actual path instead of relying this to be in compiler's
  include path list.
* no need to do it only conditionally, no #ifdef needed

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
3b6551dab1 (1829) damageext: clean up including panoramix headers
* use their actual path instead of relying this to be in compiler's
  include path list.
* no need to do it only conditionally, no #ifdef needed

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
242b2cabb3 (1829) composite: clean up including panoramix headers
* use their actual path instead of relying this to be in compiler's
  include path list.
* no need to do it only conditionally, no #ifdef needed

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
c81582f9c7 (1829) Xi: clean up including panoramix headers
* use their actual path instead of relying this to be in compiler's
  include path list.
* no need to do it only conditionally, no #ifdef needed

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
2baa4d63eb (1829) Xext: clean up including panoramix headers
* use their actual path instead of relying this to be in compiler's
  include path list.
* no need to do it only conditionally, no #ifdef needed

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
1f1afcf3ce (1829) dix: clean up including panoramix headers
* use their actual path instead of relying this to be in compiler's
  include path list.
* no need to do it only conditionally, no #ifdef needed

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
e76867668e (1832) mi: micmap: drop unused miInitVisualsProcPtr type
It's last users gone about 15 years ago with commit
a715de7f11, so no need
to keep it around any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00