From 61e61ca9c145aaa934e7d218711240a0db09adee Mon Sep 17 00:00:00 2001 From: thib Date: Tue, 8 Dec 2009 22:30:11 +0000 Subject: [PATCH] Fixed some gcc warnings (first char of string array referenced as var instead of var[0] --- doc/en/todo.sgml | 14 +++++++++++++- fileconf.c | 2 +- read_string.c | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/doc/en/todo.sgml b/doc/en/todo.sgml index 452eb32..a133faf 100644 --- a/doc/en/todo.sgml +++ b/doc/en/todo.sgml @@ -24,6 +24,18 @@ A copy of the license is included in gfdl.sgml. High priority + + option to put a maximum limit on the execution time of a task + terminate it if not finished yet + send email to let the user know + + + @reboot: don't run the job the first time it is loaded by fcron after having been created -- otherwise we can't use fcron as a 'rc' start/stop script for users without root privileges + + + jitter feature: if 100 jobs to be started at the same minute, then make them start at a random second of that minute to limit load spikes (see BSD cron jitter feature) + + + setting to limit the number of jobs of a single user in the serialq/lavgq to X jobs + make sure root always has Y slots that it can use in those queues (i.e. number of slots used by root + number of free slots >= Y) + Test (and use ?) docbook2x-man -- xlstproc ? cf http://antoine.ginies.free.fr/docbook/ch09.html @@ -129,4 +141,4 @@ mode: sgml sgml-parent-document:("fcron-doc.sgml" "book" "chapter" "sect1" "") End: --> - \ No newline at end of file + diff --git a/fileconf.c b/fileconf.c index cfa3be4..8a7842f 100644 --- a/fileconf.c +++ b/fileconf.c @@ -297,7 +297,7 @@ read_env(char *ptr, cf_t *cf) } name[j] = '\0'; - if ( name == '\0' ) + if ( name[0] == '\0' ) goto error; /* skip '=' and spaces around */ diff --git a/read_string.c b/read_string.c index e2bca96..8d12228 100644 --- a/read_string.c +++ b/read_string.c @@ -86,7 +86,7 @@ char *read_string(int echo, const char *prompt) } else { line[nc] = '\0'; } - input = ( (line) ? strdup(line):NULL ); + input = ( (line[0]) ? strdup(line):NULL ); Overwrite(line); return input; /* return malloc()ed string */ -- 2.40.0