master/pdo_list.c
changeset 1823 2bf892fe8080
parent 1363 11c0b2caa253
child 2421 bc2d4bf9cbe5
child 2589 2b9c78543663
--- a/master/pdo_list.c	Tue Feb 23 15:13:56 2010 +0100
+++ b/master/pdo_list.c	Tue Feb 23 15:49:12 2010 +0100
@@ -326,11 +326,15 @@
 {
     const ec_pdo_t *pdo;
 
-    list_for_each_entry(pdo, &pl->list, list) {
-        printk("0x%04X", pdo->index);
-        if (pdo->list.next != &pl->list)
-            printk(" ");
-    }
-}
-
-/*****************************************************************************/
+    if (list_empty(&pl->list)) {
+        printk("(none)");
+    } else {
+        list_for_each_entry(pdo, &pl->list, list) {
+            printk("0x%04X", pdo->index);
+            if (pdo->list.next != &pl->list)
+                printk(" ");
+        }
+    }
+}
+
+/*****************************************************************************/