summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2009-01-26 23:24:15 +0100
committerTobias Klauser <tklauser@distanz.ch>2009-01-26 23:24:15 +0100
commit256053718479dfce4d8469dea1cd66bb17842509 (patch)
tree1337f7a846c7db69893a94b4abffb3aa4e312b8e
parentb6850a9e3cd988829e5d09918928ef5aa9b4e731 (diff)
Print error on invalid n_chars
-rw-r--r--direct-append.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/direct-append.c b/direct-append.c
index bf18c72..af7efb4 100644
--- a/direct-append.c
+++ b/direct-append.c
@@ -55,8 +55,10 @@ int main(int argc, char *argv[])
}
n_chars = strtoul(argv[2], NULL, 0);
- if (n_chars <= 0)
+ if (n_chars <= 0) {
+ fprintf(stderr, "Invalid number of characters: %d\n", n_chars);
n_chars = DEFAULT_N_CHARS;
+ }
str = malloc(n_chars * sizeof(char));
pcmcia: convert pcmcia_request_configuration to pcmcia_enable_deviceDominik Brodowski2-3/+3 2010-09-29pcmcia: move config_{base,index,regs} to struct pcmcia_deviceDominik Brodowski1-3/+3 2010-09-29pcmcia: simplify IntTypeDominik Brodowski1-1/+0 2010-08-03pcmcia: do not use io_req_t when calling pcmcia_request_io()Dominik Brodowski1-3/+3 2010-08-03pcmcia: do not use io_req_t after call to pcmcia_request_io()Dominik Brodowski1-1/+2 2010-07-30pcmcia: remove cs_types.hDominik Brodowski1-1/+0