randr: Declare incoming property values const

RRChangeOutputProperty and RRConfigureOutputProperty should not modify
their parameters, and callers may want to pass pointers to fixed data,
so declare the value pointers as const in both cases.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard 2017-12-21 18:54:37 -08:00 committed by Adam Jackson
parent a12485ed84
commit 29f79bedf2
2 changed files with 4 additions and 4 deletions

View File

@ -915,13 +915,13 @@ extern _X_EXPORT int
RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type,
int format, int mode, unsigned long len,
void *value, Bool sendevent, Bool pending);
const void *value, Bool sendevent, Bool pending);
extern _X_EXPORT int
RRConfigureOutputProperty(RROutputPtr output, Atom property,
Bool pending, Bool range, Bool immutable,
int num_values, INT32 *values);
int num_values, const INT32 *values);
extern _X_EXPORT int
ProcRRChangeOutputProperty(ClientPtr client);

View File

@ -135,7 +135,7 @@ RRDeleteOutputProperty(RROutputPtr output, Atom property)
int
RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type,
int format, int mode, unsigned long len,
void *value, Bool sendevent, Bool pending)
const void *value, Bool sendevent, Bool pending)
{
RRPropertyPtr prop;
rrScrPrivPtr pScrPriv = rrGetScrPriv(output->pScreen);
@ -324,7 +324,7 @@ RRGetOutputProperty(RROutputPtr output, Atom property, Bool pending)
int
RRConfigureOutputProperty(RROutputPtr output, Atom property,
Bool pending, Bool range, Bool immutable,
int num_values, INT32 *values)
int num_values, const INT32 *values)
{
RRPropertyPtr prop = RRQueryOutputProperty(output, property);
Bool add = FALSE;