On 11-03-05 11:38, Michal Soltys wrote:
+
+ for (i = 0; i< strlen(strval); i++) {
+ if (strval[i] - 48 == SDIDX_CS) {
+ n = status;
+ } else if (strval[i] - 48 == SDIDX_AT3N) {
+ n = 3;
+ } else if (strval[i] - 48 == SDIDX_AT2N) {
+ n = 2;
+ }
+ if (sdlist[strval[i] - 48](n))
+ break; /* finish if command succeeded */
+ }
The patch that was applied, had 'continue' if 'n' wasn't set. But
ignoring 'n' was intended - in other cases, 'n' simply doesn't matter.
It's still present though, to keep functions in table. Code with
'continue' will skip S, K and Z completely (if they are present in
'advorder').
To quiet compiler, I'll just set n = 0 in next patches.
_______________________________________________
Nut-upsdev mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev