jingfei195887 commented on code in PR #3130:
URL: https://github.com/apache/nuttx-apps/pull/3130#discussion_r2210544472


##########
examples/mtdpart/mtdpart_main.c:
##########
@@ -364,31 +342,20 @@ int main(int argc, FAR char *argv[])
             {
               printf("ERROR: lseek to offset %ld failed: %d\n",
                      (unsigned long)sectoff, errno);
-              fflush(stdout);
-              exit(11);
+              close(fd);
+              status = 10;
+              goto errout;
             }
 
           /* Read the next block into memory */
 
           nbytes = read(fd, buffer, geo.blocksize);
           if (nbytes < 0)
             {
-              printf("ERROR: read from %s failed: %d\n", charname, errno);
-              fflush(stdout);
-              exit(12);
-            }
-          else if (nbytes == 0)

Review Comment:
   The code here is redundant. Please check lines 366 to 382 of the new file.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to