hw8: autoformat
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
#include "buf.h"
|
||||
|
||||
void *
|
||||
buf_grow1(void *v, size_t esize, ptrdiff_t n)
|
||||
{
|
||||
void* buf_grow1(void* v, size_t esize, ptrdiff_t n) {
|
||||
struct buf* p;
|
||||
size_t max = (size_t)-1 - sizeof(struct buf);
|
||||
if (v) {
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "minctest.h"
|
||||
|
||||
#include "buf.h"
|
||||
|
||||
|
||||
void test_buf_squares_operator() {
|
||||
long* ai = 0;
|
||||
for (int i = 0; i < 10000; i++)
|
||||
@@ -61,8 +60,7 @@ void test_buf_base() {
|
||||
buf_free(a);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int main(int argc, char* argv[]) {
|
||||
lrun("buf_push(), []", test_buf_squares_operator);
|
||||
lrun("buf_grow(), buf_trunc", test_buf_grow_trunc);
|
||||
lrun("buf_base_test", test_buf_base);
|
||||
|
||||
Reference in New Issue
Block a user