manio / skymax-demo

https://skyboo.net/2017/03/monitoring-voltronic-power-axpert-mex-inverter-under-linux/
GNU General Public License v2.0
51 stars 29 forks source link

tautology in main.cpp:getSettingsFile() #10

Closed dilyanpalauzov closed 2 years ago

dilyanpalauzov commented 2 years ago

https://github.com/manio/skymax-demo/blob/master/main.cpp#L90 contains:

                else if(linepart1 == "watt_factor")
                    attemptAddSetting(&wattfactor, linepart2);
                else if(linepart1 == "watt_factor")
                    attemptAddSetting(&wattfactor, linepart2);
                else

For me this is tautology: the second else will never match.

manio commented 2 years ago

Yes, you are totally right. In fact it is not even my code... Will you create a PR or you wish I should fix it myself?

dilyanpalauzov commented 2 years ago

Please fix this.