Kaydet (Commit) b5d72331 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

Wdeclaration-after-statement

Change-Id: Ie3a34305c824e2f04feb8b1db39c0df342588c43
üst 8bd07b0c
......@@ -272,10 +272,11 @@ int main(int argc, char **argv) {
while(fgets(buf, 1000, file) != NULL)
{
int j;
size_t str_len;
for (j=strlen(buf)-1;j>=0 && (buf[j]=='\n' || buf[j]=='\r');j--)
;
buf[j+1]='\0';
size_t str_len = strlen(buf) + 1;
str_len = strlen(buf) + 1;
files[num_files] = (char*)malloc(sizeof(char)*str_len);
strcpy(files[num_files], buf);
++num_files;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment