aboutsummaryrefslogtreecommitdiff
path: root/libX11/src/XlibInt.c
diff options
context:
space:
mode:
Diffstat (limited to 'libX11/src/XlibInt.c')
-rw-r--r--libX11/src/XlibInt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libX11/src/XlibInt.c b/libX11/src/XlibInt.c
index a5350e953..80c12987d 100644
--- a/libX11/src/XlibInt.c
+++ b/libX11/src/XlibInt.c
@@ -398,8 +398,7 @@ _XUnregisterInternalConnection(
watch=watch->next, wd++) {
(*watch->fn) (dpy, watch->client_data, fd, False, wd);
}
- if (info_list->watch_data)
- Xfree (info_list->watch_data);
+ Xfree (info_list->watch_data);
Xfree (info_list);
break;
}
@@ -1482,8 +1481,9 @@ char *_XAllocScratch(
unsigned long nbytes)
{
if (nbytes > dpy->scratch_length) {
- if (dpy->scratch_buffer) Xfree (dpy->scratch_buffer);
- if ((dpy->scratch_buffer = Xmalloc(nbytes)))
+ Xfree (dpy->scratch_buffer);
+ dpy->scratch_buffer = Xmalloc(nbytes);
+ if (dpy->scratch_buffer)
dpy->scratch_length = nbytes;
else dpy->scratch_length = 0;
}
@@ -1511,8 +1511,8 @@ void _XFreeTemp(
char *buf,
unsigned long nbytes)
{
- if (dpy->scratch_buffer)
- Xfree(dpy->scratch_buffer);
+
+ Xfree(dpy->scratch_buffer);
dpy->scratch_buffer = buf;
dpy->scratch_length = nbytes;
}