diff options
author | Michael Schroeder <mls@suse.de> | 2008-10-30 10:49:56 +0000 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2008-10-30 10:49:56 +0000 |
commit | edab283ed535391ab4d23260ceb666e4a986f78e (patch) | |
tree | ef0d4c2a822c558a1dc7499dc3420cc801929314 /src/strpool.c | |
parent | 11fc20a8de10440d0f88343e0d4859361b1d25b1 (diff) | |
download | libsolv-edab283ed535391ab4d23260ceb666e4a986f78e.tar.gz libsolv-edab283ed535391ab4d23260ceb666e4a986f78e.tar.bz2 libsolv-edab283ed535391ab4d23260ceb666e4a986f78e.zip |
- adapt to coding style
- log solver execution time
- replace some fprintf calls with sat_debug
Diffstat (limited to 'src/strpool.c')
-rw-r--r-- | src/strpool.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/strpool.c b/src/strpool.c index 2956a75..77d66fd 100644 --- a/src/strpool.c +++ b/src/strpool.c @@ -70,7 +70,7 @@ stringpool_clone(Stringpool *ss, Stringpool *from) } Id -stringpool_strn2id (Stringpool *ss, const char *str, unsigned len, int create) +stringpool_strn2id(Stringpool *ss, const char *str, unsigned len, int create) { Hashval h; unsigned int hh; @@ -148,18 +148,18 @@ stringpool_strn2id (Stringpool *ss, const char *str, unsigned len, int create) } Id -stringpool_str2id (Stringpool *ss, const char *str, int create) +stringpool_str2id(Stringpool *ss, const char *str, int create) { - if ( !str ) + if (!str) return STRID_NULL; - if ( !*str ) + if (!*str) return STRID_EMPTY; - unsigned len = strlen (str); - return stringpool_strn2id (ss, str, len, create); + unsigned len = strlen(str); + return stringpool_strn2id(ss, str, len, create); } void -stringpool_shrink (Stringpool *ss) +stringpool_shrink(Stringpool *ss) { ss->stringspace = sat_extend_resize(ss->stringspace, ss->sstrings, 1, STRINGSPACE_BLOCK); ss->strings = sat_extend_resize(ss->strings, ss->nstrings, sizeof(Offset), STRING_BLOCK); |