Re: [PATCH v1] main: Fix a logical error within parse_config_int()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Zijun,


Am 31.07.23 um 09:46 schrieb Zijun Hu:
Fix a logical error within parse_config_int().

Thank you for spotting and fixing this. I guess this warning was printed on the terminal?

Although obvious, instead of duplicating the commit message summary in the body, it would be great, if you still wrote a more elaborate commit message. Maybe:

Having a config file with the line below

    …

causes the config file to be ignored, and the warning below:

    …

---
  src/main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.c b/src/main.c
index 150a5af4cca4..13501440b052 100644
--- a/src/main.c
+++ b/src/main.c
@@ -458,7 +458,7 @@ static bool parse_config_int(GKeyFile *config, const char *group,
  		return false;
  	}
- if (tmp < max) {
+	if (tmp > max) {
  		warn("%s.%s = %d is out of range (> %d)", group, key, tmp, max);
  		return false;
  	}

Reviewed-by: Paul Menzel <pmenzel@xxxxxxxxxxxxx>


Kind regards,

Paul



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux