src/oping.c: Add missing "break" in handling of the "O" option.
[liboping.git] / src / oping.c
index 94515c2..883c862 100644 (file)
@@ -754,6 +754,7 @@ static int read_options (int argc, char **argv) /* {{{ */
                                        free (opt_outfile);
                                        opt_outfile = strdup (optarg);
                                }
+                               break;
 
                        case 'P':
                                {
@@ -1606,12 +1607,12 @@ static void update_host_hook (pingobj_iter_t *iter, /* {{{ */
 
                if (clock_gettime (CLOCK_REALTIME, &ts) == 0)
                {
-                       double t = ((double) ts.tv_sec) + (((double) ts.tv_nsec) / 1000000.0);
+                       double t = ((double) ts.tv_sec) + (((double) ts.tv_nsec) / 1000000000.0);
 
                        if ((sequence % 32) == 0)
                                fprintf (outfile, "#time,host,latency[ms]\n");
 
-                       fprintf (outfile, "%.3f \"%s\" %.2f\n", t, context->host, latency);
+                       fprintf (outfile, "%.3f,\"%s\",%.2f\n", t, context->host, latency);
                }
        }