comparison gcc/prefix.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* Utility to update paths from internal to external forms. 1 /* Utility to update paths from internal to external forms.
2 Copyright (C) 1997-2017 Free Software Foundation, Inc. 2 Copyright (C) 1997-2018 Free Software Foundation, Inc.
3 3
4 This file is part of GCC. 4 This file is part of GCC.
5 5
6 GCC is free software; you can redistribute it and/or modify it under 6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Library General Public License as published by 7 the terms of the GNU Library General Public License as published by
197 (name[keylen + 1] != 0 && !IS_DIR_SEPARATOR (name[keylen + 1])); 197 (name[keylen + 1] != 0 && !IS_DIR_SEPARATOR (name[keylen + 1]));
198 keylen++) 198 keylen++)
199 ; 199 ;
200 200
201 key = (char *) alloca (keylen + 1); 201 key = (char *) alloca (keylen + 1);
202 strncpy (key, &name[1], keylen); 202 memcpy (key, &name[1], keylen);
203 key[keylen] = 0; 203 key[keylen] = 0;
204 204
205 if (code == '@') 205 if (code == '@')
206 { 206 {
207 prefix = get_key_value (key); 207 prefix = get_key_value (key);