summaryrefslogtreecommitdiff
path: root/applets/clock/clock-location-tile.c
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2017-11-09 21:45:30 -0500
committerlukefromdc <[email protected]>2017-11-09 22:07:09 -0500
commitf7f9625da0417471dba802dd465ca1fefdc62c33 (patch)
treeaced013da11ef385c718063a92c20159afe63dc4 /applets/clock/clock-location-tile.c
parent64cdec0796d325d07ffc9ec4b56110b621b2947b (diff)
downloadmate-panel-f7f9625da0417471dba802dd465ca1fefdc62c33.tar.bz2
mate-panel-f7f9625da0417471dba802dd465ca1fefdc62c33.tar.xz
Clock: don't check variables that can never be < 0 for < 0
check them for = 0 instead. Found by cppcheck http://man7.org/linux/man-pages/man3/strftime.3.html This always returns 0 or a positive number of bytes
Diffstat (limited to 'applets/clock/clock-location-tile.c')
-rw-r--r--applets/clock/clock-location-tile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/applets/clock/clock-location-tile.c b/applets/clock/clock-location-tile.c
index 8620bb4b..fc331e1d 100644
--- a/applets/clock/clock-location-tile.c
+++ b/applets/clock/clock-location-tile.c
@@ -473,7 +473,7 @@ format_time (struct tm *now,
}
}
- if (strftime (buf, sizeof (buf), format, now) <= 0) {
+ if (strftime (buf, sizeof (buf), format, now) == 0) {
strcpy (buf, "???");
}