ltt library extra careful warnings check
[lttv.git] / ltt / branches / poly / ltt / convert / convert.c
index 427a10d2d41ecb3f53f4cb8183bb0de56d7d678a..760eba6d863340c3800df2b50242829299388970 100644 (file)
@@ -35,11 +35,12 @@ int readFile(int fd, void * buf, size_t size, char * mesg)
 {
    ssize_t nbBytes = read(fd, buf, size);
    
-   if(nbBytes < 0) {
-     perror("Error in readFile : ");
-     exit(1);
-   } else if((size_t)nbBytes != size) {
-     printf("%s\n",mesg);
+   if((size_t)nbBytes != size) {
+     if(nbBytes < 0) {
+       perror("Error in readFile : ");
+     } else {
+       printf("%s\n",mesg);
+     }
      exit(1);
    }
    return 0;
This page took 0.022707 seconds and 4 git commands to generate.