Blob Blame History Raw
From 05f6172dc030bc81cda795e7f5e8cb351bc01ecc Mon Sep 17 00:00:00 2001
From: Roman Shevchenko <trespasserw@gmail.com>
Date: Mon, 13 Oct 2014 18:44:06 +0200
Subject: [PATCH] avoid extra atom at the end of the targets list

---
 xsel.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/xsel.c b/xsel.c
index dbcafd3..02471a0 100644
--- a/xsel.c
+++ b/xsel.c
@@ -2138,10 +2138,6 @@ main(int argc, char *argv[])
   supported_targets[s++] = incr_atom;
   NUM_TARGETS++;
 
-  /* Get the NULL atom */
-  null_atom = XInternAtom (display, "NULL", False);
-  NUM_TARGETS++;
-
   /* Get the TEXT atom */
   text_atom = XInternAtom (display, "TEXT", False);
   supported_targets[s++] = text_atom;
@@ -2164,6 +2160,9 @@ main(int argc, char *argv[])
               NUM_TARGETS, MAX_NUM_TARGETS);
   }
 
+  /* Get the NULL atom */
+  null_atom = XInternAtom (display, "NULL", False);
+
   /* Get the COMPOUND_TEXT atom.
    * NB. We do not currently serve COMPOUND_TEXT; we can retrieve it but
    * do not perform charset conversion.