Skip to content

Commit 3cfe27c

Browse files
committed
compat: fix bug around indentation
Indentation for an if condition was incorrect. Hence upon hitting the error conditional, the code was not returning the error the value. Fixed in this change by adding braces with the if conditional. This error was found when compiling with a newer version of gcc 9.4.0 on ubuntu 20.04.2. Signed-off-by: Ani Sinha <ani@anisinha.ca>
1 parent 19da704 commit 3cfe27c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rc/python/compat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,10 +417,10 @@ off_t lseek(int fd, off_t offset, int whence)
417417
{
418418
grub_file_t file;
419419

420-
if (fd >= 0 && fd < 3)
420+
if (fd >= 0 && fd < 3) {
421421
grub_printf("Internal error: Python attempted to seek on stdin, stdout, or stderr.\n");
422422
return (off_t)-1;
423-
423+
}
424424
file = fd_to_file(fd);
425425
if (!file)
426426
return (off_t)-1;

0 commit comments

Comments
 (0)