summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2012-07-15 19:30:38 -0300
committerMarcel Holtmann <marcel@holtmann.org>2012-07-15 19:30:38 -0300
commit467596078fe7bce62eea7e3f34f6eef52a104f2f (patch)
tree4feb0c4290364b51547499ad87aefeb1d2639dba /tools
parentfa80c3b322bbed2f6ec471631077b4f0779824c2 (diff)
downloadconnman-467596078fe7bce62eea7e3f34f6eef52a104f2f.tar.gz
connman-467596078fe7bce62eea7e3f34f6eef52a104f2f.tar.bz2
connman-467596078fe7bce62eea7e3f34f6eef52a104f2f.zip
tools: Avoid shadowing buffer variable
Diffstat (limited to 'tools')
-rw-r--r--tools/private-network-test.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/private-network-test.c b/tools/private-network-test.c
index da0c88ac..24f9234c 100644
--- a/tools/private-network-test.c
+++ b/tools/private-network-test.c
@@ -176,15 +176,15 @@ int main(int argc, char *argv[])
* IP packet: src: 192.168.219.2 dst www.connman.net
* HTTP GET / request
*/
- int buf[81] = { 0x45, 0x00, 0x00, 0x51, 0x5a, 0xbe, 0x00, 0x00, 0x40,
- 0x06, 0x50, 0x73, 0xc0, 0xa8, 0xdb, 0x01, 0x3e, 0x4b,
- 0xf5, 0x80, 0x30, 0x3b, 0x00, 0x50, 0x00, 0x00, 0x00,
- 0x28, 0x04, 0xfd, 0xac, 0x9b, 0x50, 0x18, 0x02, 0x00,
- 0xa1, 0xb3, 0x00, 0x00, 0x47, 0x45, 0x54, 0x20, 0x2f,
- 0x20, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
- 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20, 0x77,
- 0x77, 0x77, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x6d, 0x61,
- 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x0d, 0x0a, 0x0d, 0x0a};
+ int buf1[81] = { 0x45, 0x00, 0x00, 0x51, 0x5a, 0xbe, 0x00, 0x00, 0x40,
+ 0x06, 0x50, 0x73, 0xc0, 0xa8, 0xdb, 0x01, 0x3e, 0x4b,
+ 0xf5, 0x80, 0x30, 0x3b, 0x00, 0x50, 0x00, 0x00, 0x00,
+ 0x28, 0x04, 0xfd, 0xac, 0x9b, 0x50, 0x18, 0x02, 0x00,
+ 0xa1, 0xb3, 0x00, 0x00, 0x47, 0x45, 0x54, 0x20, 0x2f,
+ 0x20, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
+ 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20, 0x77,
+ 0x77, 0x77, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x6d, 0x61,
+ 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x0d, 0x0a, 0x0d, 0x0a};
int buf2[81] = { 0x45, 0x00, 0x00, 0x51, 0x57, 0x9d, 0x00, 0x00, 0x40,
@@ -220,12 +220,12 @@ int main(int argc, char *argv[])
if (!fork()) {
- if (write(fd, buf, 81) < 0) {
- fprintf(stderr, "err on write() buf\n");
+ if (write(fd, buf1, sizeof(buf1)) < 0) {
+ fprintf(stderr, "err on write() buf1\n");
return -1;
}
- if (write(fd, buf2, 81) < 0) {
+ if (write(fd, buf2, sizeof(buf2)) < 0) {
fprintf(stderr, "err on write() buf2\n");
return -1;
}