diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-05-05 14:08:28 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-05-19 03:43:34 +0200 |
commit | b5d72331053ce19942463ac6e688eac74e01e649 (patch) | |
tree | 1fd25f0687ee1550c6c15b88be4d4e8a7ec17337 /onlineupdate | |
parent | 8bd07b0c54c9e8aec4a72d8b4b954abd14403ca3 (diff) |
Wdeclaration-after-statement
Change-Id: Ie3a34305c824e2f04feb8b1db39c0df342588c43
Diffstat (limited to 'onlineupdate')
-rw-r--r-- | onlineupdate/source/libmar/tool/mar.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/onlineupdate/source/libmar/tool/mar.c b/onlineupdate/source/libmar/tool/mar.c index 232e4e0c220a..d67935bd559d 100644 --- a/onlineupdate/source/libmar/tool/mar.c +++ b/onlineupdate/source/libmar/tool/mar.c @@ -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; |