Permalink
Browse files

TS-1475: fix clang warning

  • Loading branch information...
PSUdaemon committed Jul 21, 2014
1 parent 62a9a51 commit 0d493e291768db98ee62d21b936c9d83891cc36e
Showing with 1 addition and 1 deletion.
  1. +1 −1 mgmt/api/CfgContextUtils.cc
@@ -1059,7 +1059,7 @@ hms_time_to_string(TSHmsTime time)
s = snprintf(buf, sizeof(buf), "%dd%dh%dm%ds", time.d, time.h, time.m, time.s);
- if (s < sizeof(buf))
+ if ((s > 0) && (s < sizeof(buf)))
return ats_strdup(buf);
else
return NULL;

0 comments on commit 0d493e2

Please sign in to comment.