Move to kernel style SPDX license identifiers
[babeltrace.git] / tests / plugins / flt.lttng-utils.debug-info / test_dwarf.c
index 953556c41004cf43341d01f25fdacb5dbd397e2a..b394a10f972aef65b8cb697f054b07f7ce94022c 100644 (file)
@@ -1,23 +1,10 @@
 /*
- * test_dwarf.c
+ * SPDX-License-Identifier: GPL-2.0-only
  *
- * Babeltrace bt_dwarf (DWARF utilities) tests
- *
- * Copyright (c) 2015 EfficiOS Inc. and Linux Foundation
- * Copyright (c) 2015 Antoine Busque <abusque@efficios.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; under version 2 of the License.
- *
- * 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 for more details.
+ * Copyright (C) 2015 EfficiOS Inc. and Linux Foundation
+ * Copyright (C) 2015 Antoine Busque <abusque@efficios.com>
  *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Babeltrace bt_dwarf (DWARF utilities) tests
  */
 
 #include <fcntl.h>
@@ -63,7 +50,10 @@ void test_bt_no_dwarf(const char *data_dir)
        if (dwarf_info) {
                dwarf_end(dwarf_info);
        }
-       close(fd);
+
+       if (fd >= 0) {
+               close(fd);
+       }
        g_free(path);
 }
 
This page took 0.023026 seconds and 4 git commands to generate.