janitorial patch: remove some unneeded if() before free()

---
 src/XrrMonitor.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/XrrMonitor.c b/src/XrrMonitor.c
index 71d3943..f45ea04 100644
--- a/src/XrrMonitor.c
+++ b/src/XrrMonitor.c
@@ -84,8 +84,8 @@ XRRGetMonitors(Display *dpy, Window window, Bool get_active, 
int *nmonitors)
        mon = Xmalloc (rbytes);

        if (buf == NULL || mon == NULL) {
-           if (buf != NULL) Xfree(buf);
-           if (mon != NULL) Xfree(mon);
+           Xfree(buf);
+           Xfree(mon);
            _XEatDataWords (dpy, rep.length);
            UnlockDisplay (dpy);
            SyncHandle ();
@@ -194,7 +194,6 @@ XRRAllocateMonitor(Display *dpy, int noutput)
 void
 XRRFreeMonitors(XRRMonitorInfo *monitors)
 {
-    if (monitors)
        Xfree(monitors);
 }

-- 
2.1.4

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to