]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/ptm_lib.c
Merge pull request #13659 from donaldsharp/increase_mgmt_time
[mirror_frr.git] / lib / ptm_lib.c
index b66ae221cfed3e7f4b0c814dd8bfb85eefb42186..ac800be0a5ef90fbffc2718fd09634ebcf0e6190 100644 (file)
@@ -1,21 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* PTM Library
  * Copyright (C) 2015 Cumulus Networks, Inc.
- *
- * This file is part of Quagga.
- *
- * Quagga 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, or (at your option) any
- * later version.
- *
- * Quagga 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; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #ifdef HAVE_CONFIG_H
@@ -65,10 +50,10 @@ static csv_record_t *_ptm_lib_encode_header(csv_t *csv, csv_record_t *rec,
        char client_buf[32];
        csv_record_t *rec1;
 
-       sprintf(msglen_buf, "%4d", msglen);
-       sprintf(vers_buf, "%4d", version);
-       sprintf(type_buf, "%4d", type);
-       sprintf(cmdid_buf, "%4d", cmd_id);
+       snprintf(msglen_buf, sizeof(msglen_buf), "%4d", msglen);
+       snprintf(vers_buf, sizeof(vers_buf), "%4d", version);
+       snprintf(type_buf, sizeof(type_buf), "%4d", type);
+       snprintf(cmdid_buf, sizeof(cmdid_buf), "%4d", cmd_id);
        snprintf(client_buf, 17, "%16.16s", client_name);
        if (rec) {
                rec1 = csv_encode_record(csv, rec, 5, msglen_buf, vers_buf,