X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fsendfile.c;h=e26c41793b1eec41523a869e3b0fa6becec9e344;hb=46487b52695829f7befc1c382517ca2b4076453d;hp=5cfa1108752fe42c87900cb4239c3b34916622a0;hpb=fbf5870b9848929d352460f1f005b79c0b5ccc5a;p=fs%2Flustre-release.git diff --git a/lustre/tests/sendfile.c b/lustre/tests/sendfile.c index 5cfa110..e26c417 100644 --- a/lustre/tests/sendfile.c +++ b/lustre/tests/sendfile.c @@ -1,6 +1,4 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * +/* * GPL HEADER START * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -26,7 +24,7 @@ * GPL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved + * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ /* @@ -38,18 +36,15 @@ #include #include #include +#include +#include #include #include #include #include #include -#include -#include -#include -#include -#include -#include +#include #define syserr(str) { perror(str); exit(-1); } @@ -148,6 +143,6 @@ int main(int argc, char *argv[]) } close(sd[1]), close(infd), close(outfd); - sprintf(cmd, "cmp %s %s\n", sfile, tfile); + snprintf(cmd, sizeof(cmd), "cmp %s %s\n", sfile, tfile); return system(cmd); }