diff --git a/src/ccnx-wrapper.cpp b/src/ccnx-wrapper.cpp
index 041665e..d84dc0d 100644
--- a/src/ccnx-wrapper.cpp
+++ b/src/ccnx-wrapper.cpp
@@ -22,7 +22,7 @@
   if (len > 0)
   {
     bytes.resize(len);
-    memcpy(&bytes[0], src, len); 
+    memcpy(&bytes[0], src, len);
   }
 }
 
@@ -64,7 +64,7 @@
     ccn_disconnect (m_handle);
     ccn_destroy (&m_handle);
   }
-  
+
   m_handle = ccn_create ();
   if (ccn_connect(m_handle, NULL) < 0)
   {
@@ -88,7 +88,7 @@
     UniqueRecLock(m_mutex);
     m_running = false;
   }
-  
+
   m_thread.join ();
   ccn_disconnect (m_handle);
   ccn_destroy (&m_handle);
@@ -154,7 +154,7 @@
           }
 
           if (!m_running) break;
-        
+
           if (res < 0)
             BOOST_THROW_EXCEPTION (CcnxOperationException()
                                  << errmsg_info_str("ccn_run returned error"));
@@ -163,13 +163,13 @@
           pollfd pfds[1];
           {
             UniqueRecLock(m_mutex);
-          
+
             pfds[0].fd = ccn_get_connection_fd (m_handle);
             pfds[0].events = POLLIN;
             if (ccn_output_is_pending (m_handle))
               pfds[0].events |= POLLOUT;
           }
-        
+
           int ret = poll (pfds, 1, 1);
           if (ret < 0)
             {
@@ -216,9 +216,9 @@
           }
         catch (...)
           {
-            cout << "UNKNOWN EXCEPTION !!!" << endl; 
+            cout << "UNKNOWN EXCEPTION !!!" << endl;
           }
-     } 
+     }
 }
 
 Bytes
@@ -260,7 +260,7 @@
   UniqueRecLock(m_mutex);
   if (!m_running || !m_connected)
     return -1;
-  
+
 
   if (ccn_put(m_handle, head(contentObject), contentObject.size()) < 0)
   {
@@ -273,7 +273,7 @@
 int
 CcnxWrapper::publishData (const string &name, const unsigned char *buf, size_t len, int freshness)
 {
-  Bytes co = createContentObject(name, buf, len, freshness); 
+  Bytes co = createContentObject(name, buf, len, freshness);
   return putToCcnd(co);
 }
 
@@ -391,7 +391,7 @@
   UniqueRecLock(m_mutex);
   if (!m_running || !m_connected)
     return -1;
-  
+
   ccn_charbuf *pname = ccn_charbuf_create();
   ccn_closure *dataClosure = new ccn_closure;
 
@@ -456,9 +456,9 @@
     {
       return "";
     }
-  
+
   string retval = "";
-  
+
   struct ccn_charbuf *templ = ccn_charbuf_create();
   ccn_charbuf_append_tt(templ, CCN_DTAG_Interest, CCN_DTAG);
   ccn_charbuf_append_tt(templ, CCN_DTAG_Name, CCN_DTAG);
@@ -477,9 +477,9 @@
   else
     {
       struct ccn_fetch *fetch = ccn_fetch_new (tmp_handle);
-      
+
       struct ccn_fetch_stream *stream = ccn_fetch_open (fetch, name, "/local/ndn/prefix",
-                                                        NULL, 4, CCN_V_HIGHEST, 0);      
+                                                        NULL, 4, CCN_V_HIGHEST, 0);
       if (stream == NULL) {
       }
       else
@@ -490,11 +490,11 @@
           char buf[256];
           while (true) {
             res = ccn_fetch_read (stream, buf, sizeof(buf));
-            
+
             if (res == 0) {
               break;
             }
-            
+
             if (res > 0) {
               os << string(buf, res);
             } else if (res == CCN_FETCH_READ_NONE) {
@@ -525,7 +525,7 @@
 
   ccn_disconnect (tmp_handle);
   ccn_destroy (&tmp_handle);
-  
+
   return retval;
 }
 
