diff options
author | axel <axel@liljencrantz.se> | 2005-10-08 12:00:08 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2005-10-08 12:00:08 +1000 |
commit | 929519cb0f2be3dce760c77b4d3d651eed2d4a6a (patch) | |
tree | f39a7ccfdc309124f7b856b20b5dd0cb28b8215b /tokenizer.c | |
parent | 29d43269eedb4678847fafb67d3a36ba4c439ddc (diff) |
Minor edits
darcs-hash:20051008020008-ac50b-401f0e36582075d177afb2f1573c765c572f1a97.gz
Diffstat (limited to 'tokenizer.c')
-rw-r--r-- | tokenizer.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tokenizer.c b/tokenizer.c index 5f006ee2..6a012fe2 100644 --- a/tokenizer.c +++ b/tokenizer.c @@ -53,6 +53,12 @@ \return 0 if the system could not provide the memory needed, and 1 otherwise. */ + +/** + Maximum length of a string containing a file descriptor number +*/ +#define FD_STR_MAX_LEN 16 + const static wchar_t *tok_desc[] = { L"Tokenizer not yet initialized", @@ -546,9 +552,9 @@ void tok_next( tokenizer *tok ) tok_error( tok, PIPE_ERROR ); return; } - check_size( tok, 16 ); + check_size( tok, FD_STR_MAX_LEN ); tok->buff++; - swprintf( tok->last, 16, L"%d", fd ); + swprintf( tok->last, FD_STR_MAX_LEN, L"%d", fd ); tok->last_type = TOK_PIPE; return; } |