summaryrefslogtreecommitdiffstats
path: root/plugins/check_ntp.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_ntp.c')
-rw-r--r--plugins/check_ntp.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c
index ac89def..76d19ba 100644
--- a/plugins/check_ntp.c
+++ b/plugins/check_ntp.c
@@ -800,28 +800,28 @@ int main(int argc, char *argv[]){
800 800
801 switch (result) { 801 switch (result) {
802 case STATE_CRITICAL : 802 case STATE_CRITICAL :
803 asprintf(&result_line, _("NTP CRITICAL:")); 803 xasprintf(&result_line, _("NTP CRITICAL:"));
804 break; 804 break;
805 case STATE_WARNING : 805 case STATE_WARNING :
806 asprintf(&result_line, _("NTP WARNING:")); 806 xasprintf(&result_line, _("NTP WARNING:"));
807 break; 807 break;
808 case STATE_OK : 808 case STATE_OK :
809 asprintf(&result_line, _("NTP OK:")); 809 xasprintf(&result_line, _("NTP OK:"));
810 break; 810 break;
811 default : 811 default :
812 asprintf(&result_line, _("NTP UNKNOWN:")); 812 xasprintf(&result_line, _("NTP UNKNOWN:"));
813 break; 813 break;
814 } 814 }
815 if(offset_result == STATE_UNKNOWN){ 815 if(offset_result == STATE_UNKNOWN){
816 asprintf(&result_line, "%s %s", result_line, _("Offset unknown")); 816 xasprintf(&result_line, "%s %s", result_line, _("Offset unknown"));
817 asprintf(&perfdata_line, ""); 817 xasprintf(&perfdata_line, "");
818 } else { 818 } else {
819 asprintf(&result_line, "%s %s %.10g secs", result_line, _("Offset"), offset); 819 xasprintf(&result_line, "%s %s %.10g secs", result_line, _("Offset"), offset);
820 asprintf(&perfdata_line, "%s", perfd_offset(offset)); 820 xasprintf(&perfdata_line, "%s", perfd_offset(offset));
821 } 821 }
822 if (do_jitter) { 822 if (do_jitter) {
823 asprintf(&result_line, "%s, jitter=%f", result_line, jitter); 823 xasprintf(&result_line, "%s, jitter=%f", result_line, jitter);
824 asprintf(&perfdata_line, "%s %s", perfdata_line, perfd_jitter(jitter)); 824 xasprintf(&perfdata_line, "%s %s", perfdata_line, perfd_jitter(jitter));
825 } 825 }
826 printf("%s|%s\n", result_line, perfdata_line); 826 printf("%s|%s\n", result_line, perfdata_line);
827 827