Appending NULL to an existing options list simply walks the entire existing list before returning it unchanged, so if we aren't creating a new list to merge, don't bother merging it either.
Signed-off-by: Alan Coopersmith <[email protected]> --- src/mouse.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mouse.c b/src/mouse.c index 238d7f7..d883b82 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -2431,13 +2431,13 @@ SetupMouse(InputInfoPtr pInfo) * for the new protocol. */ if (pMse->oldProtocolID != pMse->protocolID) { - pointer tmp = NULL; if ((pMse->protocolID >= 0) && (pMse->protocolID < PROT_NUMPROTOS) - && mouseProtocols[pMse->protocolID].defaults) - tmp = xf86OptionListCreate( + && mouseProtocols[pMse->protocolID].defaults) { + pointer tmp = xf86OptionListCreate( mouseProtocols[pMse->protocolID].defaults, -1, 0); - pInfo->options = xf86OptionListMerge(pInfo->options, tmp); + pInfo->options = xf86OptionListMerge(pInfo->options, tmp); + } /* * If baudrate is set write it back to the option * list so that the serial interface code can access -- 1.7.3.2 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
