Merge release-4-5-patches into release-4-6
[alexxy/gromacs.git] / src / gmxlib / confio.c
index 41a509e307acc9d03003ae7a8a45d72b3cba13e7..886983a6d513dda269c8ad5b106ebaca6fd74ac5 100644 (file)
@@ -41,7 +41,7 @@
 #include "typedefs.h"
 #include "smalloc.h"
 #include "sysstuff.h"
-#include "errno.h"
+#include <errno.h>
 #include "macros.h"
 #include "string2.h"
 #include "confio.h"
@@ -68,7 +68,7 @@ static int read_g96_pos(char line[],t_symtab *symtab,
 {
   t_atoms *atoms;
   gmx_bool   bEnd;
-  int    nwanted,natoms,atnr,resnr,oldres,newres,shift;
+  int    nwanted,natoms,atnr,resnr=0,oldres,newres,shift;
   char   anm[STRLEN],resnm[STRLEN];
   char   c1,c2;
   double db1,db2,db3;
@@ -98,7 +98,7 @@ static int read_g96_pos(char line[],t_symtab *symtab,
                      "Found more coordinates (%d) in %s than expected %d\n",
                      natoms,infile,nwanted);
        if (atoms) {
-         if (atoms && fr->bAtoms &&
+         if (fr->bAtoms &&
              (sscanf(line,"%5d%c%5s%c%5s%7d",&resnr,&c1,resnm,&c2,anm,&atnr) 
               != 6)) {
            if (oldres>=0)
@@ -881,7 +881,7 @@ gmx_bool gro_next_x_or_v(FILE *status,t_trxframe *fr)
   t_symtab symtab;
   char    title[STRLEN],*p;
   double  tt;
-  int     ndec,i;
+  int     ndec=0,i;
 
   if (gmx_eof(status))
     return FALSE;