mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
treewide return code of X_SEND_REPLY_WITH_RPCBUF()
The macro will automatically return BadAlloc if the buffer is broken, otherwise Success. Thus, we don't need extra prior rpcbuf check. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
56cd66d147
commit
f8ad69698a
@@ -375,9 +375,6 @@ ProcVidModeGetAllModeLines(ClientPtr client)
|
||||
fillModeInfoV2(&rpcbuf, dotClock, mode);
|
||||
} while (pVidMode->GetNextModeline(pScreen, &mode, &dotClock));
|
||||
|
||||
if (rpcbuf.error)
|
||||
return BadAlloc;
|
||||
|
||||
xXF86VidModeGetAllModeLinesReply reply = {
|
||||
.modecount = modecount
|
||||
};
|
||||
@@ -386,8 +383,7 @@ ProcVidModeGetAllModeLines(ClientPtr client)
|
||||
swapl(&reply.modecount);
|
||||
}
|
||||
|
||||
X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf);
|
||||
return Success;
|
||||
return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf);
|
||||
}
|
||||
|
||||
#define MODEMATCH(mode,stuff) \
|
||||
@@ -1220,9 +1216,6 @@ ProcVidModeGetMonitor(ClientPtr client)
|
||||
x_rpcbuf_write_string_pad(&rpcbuf, vendorStr);
|
||||
x_rpcbuf_write_string_pad(&rpcbuf, modelStr);
|
||||
|
||||
if (rpcbuf.error)
|
||||
return BadAlloc;
|
||||
|
||||
xXF86VidModeGetMonitorReply reply = {
|
||||
.nhsync = nHsync,
|
||||
.nvsync = nVrefresh,
|
||||
@@ -1230,8 +1223,7 @@ ProcVidModeGetMonitor(ClientPtr client)
|
||||
.modelLength = x_safe_strlen(modelStr),
|
||||
};
|
||||
|
||||
X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf);
|
||||
return Success;
|
||||
return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf);
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -1338,9 +1330,6 @@ ProcVidModeGetDotClocks(ClientPtr client)
|
||||
free(Clocks);
|
||||
}
|
||||
|
||||
if (rpcbuf.error)
|
||||
return BadAlloc;
|
||||
|
||||
xXF86VidModeGetDotClocksReply reply = {
|
||||
.clocks = numClocks,
|
||||
.maxclocks = MAXCLOCKS,
|
||||
@@ -1353,8 +1342,7 @@ ProcVidModeGetDotClocks(ClientPtr client)
|
||||
swapl(&reply.flags);
|
||||
}
|
||||
|
||||
X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf);
|
||||
return Success;
|
||||
return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf);
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -1509,11 +1497,9 @@ ProcVidModeGetGammaRamp(ClientPtr client)
|
||||
swaps(&reply.size);
|
||||
}
|
||||
|
||||
X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf);
|
||||
return Success;
|
||||
return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
ProcVidModeGetGammaRampSize(ClientPtr client)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user