openocd: fix SPDX tag format for files .c
[fw/openocd] / src / helper / binarybuffer.c
index 3d35702ac96ed0829b9d11b6e51f030f15c48a80..5f38b43ae1957f8142d6a41f3cfbce9face47c52 100644 (file)
@@ -1,22 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
 /***************************************************************************
  *   Copyright (C) 2004, 2005 by Dominic Rath                              *
  *   Dominic.Rath@gmx.de                                                   *
  *                                                                         *
  *   Copyright (C) 2007,2008 Ã˜yvind Harboe                                 *
  *   oyvind.harboe@zylin.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; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- *   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.                          *
- *                                                                         *
- *   You should have received a copy of the GNU General Public License     *
- *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
  ***************************************************************************/
 
 #ifdef HAVE_CONFIG_H
@@ -53,7 +42,7 @@ static const char hex_digits[] = {
 
 void *buf_cpy(const void *from, void *_to, unsigned size)
 {
-       if (NULL == from || NULL == _to)
+       if (!from || !_to)
                return NULL;
 
        /* copy entire buffer */
@@ -222,7 +211,7 @@ static void str_radix_guess(const char **_str, unsigned *_str_len,
        unsigned *_radix)
 {
        unsigned radix = *_radix;
-       if (0 != radix)
+       if (radix != 0)
                return;
        const char *str = *_str;
        unsigned str_len = *_str_len;