diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-08-18 10:50:01 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-08-18 10:50:01 -0700 |
commit | 97b55a970dc5281c2d41500990d99fcd24d2dd5f (patch) | |
tree | 8fe27f9eb52684eefd17d819ccc82ab5500abce2 /src/gram.y | |
parent | 8b2a314c267071656ca4d86bae56c6d82bb8127a (diff) |
Replace malloc(strlen()+1); strcpy(); pairs with strdup()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/gram.y')
-rw-r--r-- | src/gram.y | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -652,8 +652,7 @@ button : BUTTON number { $$ = $2; } ; -string : STRING { ptr = malloc(strlen($1)+1); - strcpy(ptr, $1); +string : STRING { ptr = strdup($1); RemoveDQuote(ptr); $$ = ptr; } |