This repository has been archived on 2023-11-05. You can view files and clone it, but cannot push or open issues or pull requests.
wasm-micro-runtime/samples/spawn-thread/wasm-apps/sum.c
Wenyong Huang 3ded9ece83
Apply clang format for samples files (#833)
Apply clang format for c source files under samples folder
2021-11-15 12:48:35 +08:00

16 lines
273 B
C

/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
int
sum(int start, int length)
{
int sum = 0, i;
for (i = start; i < start + length; i++) {
sum += i;
}
return sum;
}