Add shared copyright to EfficiOS Inc. and Linux Foundation
[babeltrace.git] / formats / ctf / types / integer.c
index 9b918954d269dbb4d04c83f2f4146cec7a5b83f1..719823b9ff23675aab3a0f1b787ddeb8f0af25f2 100644 (file)
@@ -3,7 +3,9 @@
  *
  * Integers read/write functions.
  *
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -40,11 +42,11 @@ int _aligned_integer_read(struct stream_pos *ppos,
        int rbo = (integer_declaration->byte_order != BYTE_ORDER);      /* reverse byte order */
 
        ctf_align_pos(pos, integer_declaration->p.alignment);
-       assert(!(pos->offset % CHAR_BIT));
 
        if (!ctf_pos_access_ok(pos, integer_declaration->len))
                return -EFAULT;
 
+       assert(!(pos->offset % CHAR_BIT));
        if (!integer_declaration->signedness) {
                switch (integer_declaration->len) {
                case 8:
@@ -142,11 +144,11 @@ int _aligned_integer_write(struct stream_pos *ppos,
        int rbo = (integer_declaration->byte_order != BYTE_ORDER);      /* reverse byte order */
 
        ctf_align_pos(pos, integer_declaration->p.alignment);
-       assert(!(pos->offset % CHAR_BIT));
 
        if (!ctf_pos_access_ok(pos, integer_declaration->len))
                return -EFAULT;
 
+       assert(!(pos->offset % CHAR_BIT));
        if (pos->dummy)
                goto end;
        if (!integer_declaration->signedness) {
This page took 0.023189 seconds and 4 git commands to generate.