timer: fix pending counter
[dpdk.git] / lib / librte_cmdline / cmdline.c
old mode 100644 (file)
new mode 100755 (executable)
index a51d0ec..b3dc17c
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  * 
- *   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without
@@ -256,7 +256,7 @@ cmdline_interact(struct cmdline *cl)
 
        c = -1;
        while (1) {
-               if (read(cl->s_in, &c, 1) < 0)
+               if (read(cl->s_in, &c, 1) <= 0)
                        break;
                if (cmdline_in(cl, &c, 1) < 0)
                        break;