Merge pull request #2878 from nhuff/freebsd_pending_io
authorPavel Rochnyak <pavel2000@ngs.ru>
Thu, 26 Jul 2018 04:25:29 +0000 (11:25 +0700)
committerGitHub <noreply@github.com>
Thu, 26 Jul 2018 04:25:29 +0000 (11:25 +0700)
Report number of in progess disk IO requests on FreeBSD.

src/amqp1.c
src/snmp.c

index 635af0f..87bb50c 100644 (file)
@@ -372,7 +372,7 @@ static int amqp1_notify(notification_t const *n,
   }
 
   cd_message_t *cdm = malloc(sizeof(*cdm));
-  if (cdm == NULL ){
+  if (cdm == NULL{
     ERROR("amqp1 plugin: notify failed");
     return -1;
   }
@@ -471,15 +471,16 @@ static int amqp1_write(const data_set_t *ds, const value_list_t *vl, /* {{{ */
     format_json_initialize((char *)cdm->mbuf.start, &bfill, &bfree);
     format_json_value_list((char *)cdm->mbuf.start, &bfill, &bfree, ds, vl,
                            instance->store_rates);
-    status= format_json_finalize((char *)cdm->mbuf.start, &bfill, &bfree);
+    status = format_json_finalize((char *)cdm->mbuf.start, &bfill, &bfree);
     if (status != 0) {
-      ERROR("amqp1 plugin: format_json_finalize failed with status %i.", status);
+      ERROR("amqp1 plugin: format_json_finalize failed with status %i.",
+            status);
       cd_message_free(cdm);
-      return(status);
+      return status;
     }
     cdm->mbuf.size = strlen(cdm->mbuf.start);
     if (cdm->mbuf.size >= BUFSIZE) {
-      ERROR("amqp1 plugin: format graphite failed");
+      ERROR("amqp1 plugin: format json failed");
       cd_message_free(cdm);
       return -1;
     }
index a86d085..af26fbd 100644 (file)
@@ -1539,7 +1539,7 @@ static int csnmp_dispatch_table(host_definition_t *host,
       value_cell_ptr[0] = value_cell_ptr[0]->next;
   } /* while (have_more) */
 
-  return (0);
+  return 0;
 } /* int csnmp_dispatch_table */
 
 static int csnmp_read_table(host_definition_t *host, data_definition_t *data) {