From b6be82b8edefa452e72ed53391971e53d9dccf83 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Fri, 25 Jul 2014 23:28:21 +0200 Subject: jsrrdgraph: Fixed jshint warnings/errors Many fall in the category missing semicolon, but there are legitimate bugs (like throwing an error with an undefined variable, using isInfinite instead of !isFinite or fabs instead of Math.abs). At some places, I moved the variable declarations to avoid duplicate definition warnings. Redundant breaks have been removed (after return / throw). Global variables were implicitly defined in RrdDataFile (which caught my attention) and Base64, these have been made local. Also fixed some whitespace errors. Yay, the consistency. Not all (style) issues are fixed. --- js/base64.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'js/base64.js') diff --git a/js/base64.js b/js/base64.js index 7d9536a..4cd5c96 100644 --- a/js/base64.js +++ b/js/base64.js @@ -113,7 +113,8 @@ var Base64 = { _utf8_decode : function (utftext) { var string = ""; var i = 0; - var c = c1 = c2 = 0; + var c, c1, c2, c3; + c = c1 = c2 = 0; while ( i < utftext.length ) { @@ -140,4 +141,4 @@ var Base64 = { return string; } -} +}; -- cgit v1.1