fsstress: add the ability to create/delete subvolumes
[xfstests-dev.git] / ltp / aio-stress.c
index ebff1bd42a92e51cdd0de72e2419b840e91b19f2..06e1919d636191f237d4585314c77a6f8b410aa3 100644 (file)
@@ -1,26 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2004 SuSE, Inc.  All Rights Reserved.
 /*
  * Copyright (c) 2004 SuSE, Inc.  All Rights Reserved.
- * 
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- * 
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * 
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like.  Any license provided herein, whether implied or
- * otherwise, applies only to this software file.  Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- * 
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- * 
- *
+ */
+
+/*
  * aio-stress
  *
  * will open or create each file on the command line, and start a series
  * aio-stress
  *
  * will open or create each file on the command line, and start a series
@@ -1413,9 +1396,9 @@ int main(int ac, char **av)
                num_threads);
     }
 
                num_threads);
     }
 
-    t = malloc(num_threads * sizeof(*t));
+    t = calloc(num_threads, sizeof(*t));
     if (!t) {
     if (!t) {
-        perror("malloc");
+        perror("calloc");
        exit(1);
     }
     global_thread_info = t;
        exit(1);
     }
     global_thread_info = t;