>>> /* maximum as in procps 3.2.7 */
>>> period = xatou_range(str, 1, 999999999);
>>> argv += optind;
>>>
>> -1 causes an error 'invalid number'
>
> And 0?
>
>> and 999999999/(3600*24*365)=31 but 2036 (when time() ends :) - 2008 = 28 so
>> no need to worry about
>> if someone likes to type long number he likes to wait long time also.
>
> Maybe reducing the limit could be an idea?
> period = xatou_range(str, 1, 3600*24*365);
>
any upper limit is artificial, so why not say: "The user wants to 30 Years so
lets wait"
the 0 causes some flicker :) i don not think it is important to fix, it does
not crash or
cause any serious harm.
>>> header=xasprintf("Every %ds: %-*s", period, width, cmd);
>>>
>> i tought that also but any window resize will cause problems. These days i
>> often use minicom/xterm to monitor and discover i have
>> a much to small window .....
>
> I see...in that case it would be better to free header every time as it leaks
> memory.
>
so far i know asprint() should do an realloc if the pointer is not NULL.
(correct me if i am wrong)
So i had to free after leaving the endless loop.
re,
wh
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox