]> git.draconx.ca Git - cdecl99.git/blobdiff - src/parse.y
libcdecl: Avoid using strcpy w/ empty strings.
[cdecl99.git] / src / parse.y
index 918cbd033a085870a70fc8f59a8058e468ebfbc5..1542c0904e5bea5320ec864646fcfd4ddb63bd64 100644 (file)
@@ -375,7 +375,7 @@ declspec_noid: declspec_notype | typespec_noid
 
 vla_ident: T_IDENT | T_ASTERISK {
        ALLOC($$, sizeof "");
-       strcpy($$, "");
+       *$$ = 0;
 }
 
 array: T_LBRACKET array_length T_RBRACKET {
@@ -572,7 +572,7 @@ array_length: T_UINT {
 
 english_vla: T_IDENT | {
        ALLOC($$, sizeof "");
-       strcpy($$, "");
+       *$$ = 0;
 }
 
 %%