On 2018/09/19 21:26, Tom Murphy wrote:
>               if(update_interval_bat != NOBATTERY && update_interval_bat != 
> update_interval_old) {
> -                     char buf[max_user_text];
> +-                    char buf[max_user_text];
>   
>  +#ifndef __OpenBSD__
> ++                    char buf[max_user_text];
>                       get_battery_short_status(buf, max_user_text, "BAT0");
>                       if(buf[0] == 'D') {
>                               update_interval = update_interval_bat;
>                       } else {
>                               update_interval = update_interval_old;
>                       }
> ++#else
> ++            if (strcmp(get_apm_adapter(),"off-line") == 0) {
> ++                            update_interval = update_interval_bat;
> ++                } else {
> ++                            update_interval = update_interval_old;
> ++                }
>  +#endif

If you fix the memory leak you introduced I'll commit it :)

Reply via email to