Skip to content

dix: fix a misused const pointer in cursor.c

LiChenG-P requested to merge LiChenG-P/xserver:master into master

I was wondering in the xserver code base and came across this bug warned by my clang-tidy linter. It turns out that const CursorPtr actually means struct _Cursor *const, a constant pointer, which does not prevent you from accidentally modifying the value it points to, like the cursor refcnt. So I added a separate const pointer typedef to provide the pointer to constant semantic needed.

Merge request reports

Loading