comparison libiberty/spaces.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents a06113de4d67
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* Allocate memory region filled with spaces. 1 /* Allocate memory region filled with spaces.
2 Copyright (C) 1991 Free Software Foundation, Inc. 2 Copyright (C) 1991-2017 Free Software Foundation, Inc.
3 3
4 This file is part of the libiberty library. 4 This file is part of the libiberty library.
5 Libiberty is free software; you can redistribute it and/or 5 Libiberty is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
51 static char *buf; 51 static char *buf;
52 static int maxsize; 52 static int maxsize;
53 53
54 if (count > maxsize) 54 if (count > maxsize)
55 { 55 {
56 if (buf) 56 free (buf);
57 {
58 free (buf);
59 }
60 buf = (char *) malloc (count + 1); 57 buf = (char *) malloc (count + 1);
61 if (buf == (char *) 0) 58 if (buf == (char *) 0)
62 return 0; 59 return 0;
63 for (t = buf + count ; t != buf ; ) 60 for (t = buf + count ; t != buf ; )
64 { 61 {