aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block/vvfat.c2
-rw-r--r--cmd.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/block/vvfat.c b/block/vvfat.c
index 0701df49f4..66259b48d5 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -1099,8 +1099,8 @@ static inline void vvfat_close_current_file(BDRVVVFATState *s)
*/
static inline int find_mapping_for_cluster_aux(BDRVVVFATState* s,int cluster_num,int index1,int index2)
{
- int index3=index1+1;
while(1) {
+ int index3;
mapping_t* mapping;
index3=(index1+index2)/2;
mapping=array_get(&(s->mapping),index3);
diff --git a/cmd.c b/cmd.c
index cc70311b9f..2336334eea 100644
--- a/cmd.c
+++ b/cmd.c
@@ -287,7 +287,8 @@ static char *qemu_strsep(char **input, const char *delim)
{
char *result = *input;
if (result != NULL) {
- char *p = result;
+ char *p;
+
for (p = result; *p != '\0'; p++) {
if (strchr(delim, *p)) {
break;