Return a cached value of the build string in order to avoid recomputing * and converting it in hex every time: this string is shown in the INFO * output that should be fast. */
| 56 | * and converting it in hex every time: this string is shown in the INFO |
| 57 | * output that should be fast. */ |
| 58 | char *redisBuildIdString(void) { |
| 59 | static char buf[32]; |
| 60 | static int cached = 0; |
| 61 | if (!cached) { |
| 62 | snprintf(buf,sizeof(buf),"%llx",(unsigned long long) redisBuildId()); |
| 63 | cached = 1; |
| 64 | } |
| 65 | return buf; |
| 66 | } |
no test coverage detected