X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fopenfilleddirunlink.c;h=9dff048603e1671756c55aa41f51c17a52605bdf;hb=1155c2fee4c197bfc295f761d52f9b748c37ad79;hp=9b07c649b8824fa8c0278f42b36c777097f7fb42;hpb=d2d56f38da01001c92a09afc6b52b5acbd9bc13c;p=fs%2Flustre-release.git diff --git a/lustre/tests/openfilleddirunlink.c b/lustre/tests/openfilleddirunlink.c index 9b07c64..9dff048 100644 --- a/lustre/tests/openfilleddirunlink.c +++ b/lustre/tests/openfilleddirunlink.c @@ -1,5 +1,31 @@ -/* -*- 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. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 only, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License version 2 for more details (a copy is included + * in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU General Public License + * version 2 along with this program; If not, see + * http://www.gnu.org/licenses/gpl-2.0.html + * + * GPL HEADER END + */ +/* + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + * Use is subject to license terms. + */ +/* + * This file is part of Lustre, http://www.lustre.org/ + * Lustre is a trademark of Sun Microsystems, Inc. */ /* for O_DIRECTORY */ @@ -42,7 +68,7 @@ int main(int argc, char **argv) exit(1); } - sprintf(fname, "%s/0", dname1); + snprintf(fname, sizeof(fname), "%s/0", dname1); fprintf(stderr, "creating file %s\n", fname); fd = creat(fname, 0666); if (fd < 0) {