[cowdancer] 01/02: qemubuilder.c: Change for-loops to be C89-compliant

James Clarke jrtc27-guest at moszumanska.debian.org
Fri Jul 1 18:21:51 UTC 2016


This is an automated email from the git hooks/post-receive script.

jrtc27-guest pushed a commit to annotated tag debian/0.80_bpo8+1
in repository cowdancer.

commit feb275eb34e9c40b582f583c4cf1876652f32b52
Author: James Clarke <jrtc27 at jrtc27.com>
Date:   Thu Jun 30 22:16:23 2016 +0100

    qemubuilder.c: Change for-loops to be C89-compliant
---
 qemubuilder.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/qemubuilder.c b/qemubuilder.c
index 8bc65c6..dc85412 100755
--- a/qemubuilder.c
+++ b/qemubuilder.c
@@ -163,6 +163,7 @@ static int loop_umount(const char* device)
 */
 static FILE* create_script(const char* mountpoint, const char* relative_path)
 {
+  char *c;
   char *s = NULL;
   FILE *f = NULL;
   FILE *ret = NULL;
@@ -170,7 +171,7 @@ static FILE* create_script(const char* mountpoint, const char* relative_path)
   asprintf(&s, "%s/%s", mountpoint, relative_path);
 
   /* Create directories in relative_path */
-  for (char *c = s + strlen(mountpoint) + 1; *c; ++c)
+  for (c = s + strlen(mountpoint) + 1; *c; ++c)
     {
       if (*c != '/') continue;
       *c = 0;
@@ -414,7 +415,8 @@ static const char* format_for_image(const char* file)
     { ".qemu", "raw" }
   };
   int file_len = strlen(file);
-  for (int i = 0; i < sizeof(formats) / sizeof(formats[0]); ++i)
+  int i;
+  for (i = 0; i < sizeof(formats) / sizeof(formats[0]); ++i)
     {
       const char *ext = formats[i][0];
       const char *format = formats[i][1];

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pbuilder/cowdancer.git



More information about the Pbuilder-maint mailing list