Commit Graph

19574 Commits

Author SHA1 Message Date
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
Enrico Weigelt, metux IT consult
78d6beb33f (1833) mi: move StaticGrayMask and GrayScaleMask into micmap.c
micmap.c is the only consumer of these, so move them into there,
instead of maintaining them in the public API w/o any practical need.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
478530d700 (1833) mi: move MIN_TRUE_DEPTH define into micmap.c
This .c file is the only consumer of that define, so move it
there instead of carrying it around in public API.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
915f90b8eb (1834) mi: make SetInstalledmiColormap() a static inline function
Add some type safety by converting the macro into static inline function.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
07b3a3142c (1834) mi: unexport GetInstalledmiColormap and make it static inline function
Not used by any external drivers, so no need to keep it public.
Also add some type-safety by implementing it as static inline function.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
6cc3df046e (1836) dix: make MasksPerDetailMask define private
It's only ever used inside dix/grabs.c, no outside users,
no no need to keep it public.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:12 +01:00
Enrico Weigelt, metux IT consult
9e8a2c81e3 (1841) dix: move SHAREDCOLOR struct declaration out of public header
Not used by any external module/driver, 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
a55235ee1f (1841) dix: move SHCO struct declaration out of public header
Not used by any external module/driver, 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
fcd401eff0 (1841) dix: move Entry (struct _CMEntry) declaration out of public header
Not used by any external module/driver, 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
7178248996 (1841) dix: move ColormapRec declaration out of public header
Not used by any external module/driver, 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