[Libreoffice-commits] core.git: Branch 'feature/mar-updater' - onlineupdate/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Fri May 19 01:54:57 UTC 2017
onlineupdate/source/libmar/tool/mar.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit d3d9ad14aca343841ab6baaa1aedb50521513285
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Fri May 5 14:08:28 2017 +0200
Wdeclaration-after-statement
Change-Id: Ie3a34305c824e2f04feb8b1db39c0df342588c43
Reviewed-on: https://gerrit.libreoffice.org/37797
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
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;
More information about the Libreoffice-commits
mailing list