const char *wlan_interface = NULL;
const char *eth_interface = NULL;
-const char *wmii_path = NULL;
+char *wmii_path = NULL;
const char *time_format = NULL;
bool use_colors = false;
bool get_ethspeed = false;
generate(ORDER_BATTERY, "battery", get_battery_info(current));
}
- if (j == order[ORDER_TIME] && time_format != NULL) {
- /* Get date & time */
- time_t current_time = time(NULL);
- struct tm *current_tm = localtime(¤t_time);
- (void)strftime(part, sizeof(part), time_format, current_tm);
- generate(ORDER_TIME, "time", part);
+ if (j == order[ORDER_TIME]) {
+ if (time_format != NULL) {
+ /* Get date & time */
+ time_t current_time = time(NULL);
+ struct tm *current_tm = localtime(¤t_time);
+ (void)strftime(part, sizeof(part), time_format, current_tm);
+ generate(ORDER_TIME, "time", part);
+ } else {
+ generate(ORDER_TIME, "time", "");
+ }
}
}