commit 7f88d730e257a5111b8d80c9db010c6092c17011
parent 98298e859fe6e618a3480ceb29c7947d82014df9
Author: Kyle Milz <kyle@0x30.net>
Date: Sat, 9 Jul 2016 15:48:45 -0600
lib: add copyrights
Diffstat:
2 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/lib/runtime.c b/lib/runtime.c
@@ -1,3 +1,18 @@
+/*
+ * Copyright (c) 2016 Kyle Milz <kyle@0x30.net>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
#include <assert.h>
#include <err.h> /* err, errx, warn */
#include <limits.h> /* PATH_MAX */
@@ -175,6 +190,8 @@ send_dynamic(int fd)
lines_ptr = w->lines_ptr;
old_lines_ptr = w->old_lines;
for (line = 0; line < w->size; line++) {
+ assert(lines_ptr[line] >= old_lines_ptr[line]);
+
uint64_t diff = lines_ptr[line] - old_lines_ptr[line];
/* Let's try incremental updating of old_lines. */
old_lines_ptr[line] = lines_ptr[line];
diff --git a/lib/runtime.h b/lib/runtime.h
@@ -1,3 +1,18 @@
+/*
+ * Copyright (c) 2016 Kyle Milz <kyle@0x30.net>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
#include <stdint.h>
struct citrun_node {
uint64_t *lines_ptr;