]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Don't use uninitialized values
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 13 Jun 2011 16:17:33 +0000 (18:17 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 13 Jun 2011 16:17:33 +0000 (18:17 +0200)
client.c
manual.c

index 77bdd425fdf2be1f3ab6a5f676495cfb270ecd71..6356684459f749604b5eb8306f8edb7f84180fc1 100644 (file)
--- a/client.c
+++ b/client.c
@@ -1082,12 +1082,11 @@ process_cmd_delete(CMD_Request *msg, char *line)
       fprintf(stderr, "Could not get address for hostname\n");
       ok = 0;
     } else {
+      UTI_IPHostToNetwork(&address, &msg->data.del_source.ip_addr);
       ok = 1;
     }
   }
 
-  UTI_IPHostToNetwork(&address, &msg->data.del_source.ip_addr);
-
   return ok;
   
 }
index 93a9617f708d2164e4ffa013e5dd07fd03bf4a01..c3f779776552125655564db6f361e352f2d82c27 100644 (file)
--- a/manual.c
+++ b/manual.c
@@ -145,6 +145,8 @@ estimate_and_set_system(struct timeval *now, int offset_provided, double offset,
     }
     b1 = freq = 0.0;
     found_freq = 0;
+    agos[0] = 0.0;
+    offsets[0] = b0;
   }
 
   if (offset_provided) {