]> git.pld-linux.org Git - packages/net-snmp.git/commitdiff
- upstream code style (spaces for indent)
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 21 Dec 2009 20:05:37 +0000 (20:05 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    net-snmp-loadave-writable.patch -> 1.2

net-snmp-loadave-writable.patch

index 7ba3d3131c0b636afdd812302523ff67e5eeb5ea..3480d15b1a36b899f3009c186af7a9a474a2daa9 100644 (file)
@@ -25,7 +25,7 @@
 +                    "write to laConfig not ASN_OCTET_STR\n"));
 +        return SNMP_ERR_WRONGTYPE;
 +    }
-+      /* allow max value of 65536.00 */
++    /* allow max value of 65536.00 */
 +    if (var_val_len > 8) {
 +        DEBUGMSGTL(("ucd-snmp/loadave",
 +                    "write to laConfig: bad length\n"));
 +    }
 +    if (action == COMMIT) {
 +        if (var_val_len != 0) {
-+                      double val;
-+                      if (sscanf(var_val, "%7lf", &val) == 1) {
-+                              int idx = name[name_len - 1] - 1;
-+                              maxload[idx] = val;
-+                      } else {
-+                              DEBUGMSGTL(("ucd-snmp/loadave",
-+                                                      "write to laConfig: invalid value\n"));
-+                              return SNMP_ERR_WRONGVALUE;
-+                      }
-+              }
++            double val;
++            if (sscanf(var_val, "%7lf", &val) == 1) {
++                int idx = name[name_len - 1] - 1;
++                maxload[idx] = val;
++            } else {
++                DEBUGMSGTL(("ucd-snmp/loadave",
++                            "write to laConfig: invalid value\n"));
++                return SNMP_ERR_WRONGVALUE;
++            }
++        }
 +    }
 +    return SNMP_ERR_NOERROR;
 +}
@@ -55,9 +55,9 @@
          long_ret = name[*length - 1];
          return ((u_char *) (&long_ret));
 +    case LOADMAXVAL:
-+              /* setup write method, but don't return yet */
-+              *write_method = write_laConfig;
-+              break;
++        /* setup write method, but don't return yet */
++        *write_method = write_laConfig;
++        break;
      case ERRORNAME:
          sprintf(errmsg, "Load-%d", ((name[*length - 1] == 1) ? 1 :
                                      ((name[*length - 1] == 2) ? 5 : 15)));
This page took 0.09194 seconds and 4 git commands to generate.