diff options
| author | 2008-08-12 23:34:51 -0700 | |
|---|---|---|
| committer | 2008-08-12 23:34:51 -0700 | |
| commit | 818fcb034e5df3a3e4a5464de7eaf7b57e34cf45 (patch) | |
| tree | 6107803c8faafbcbae14205c87460b07692dee0a /src | |
| parent | 15bb91aabae62ab0f26b34ecf7ddf9ed1aeaf172 (diff) | |
| download | libimobiledevice-818fcb034e5df3a3e4a5464de7eaf7b57e34cf45.tar.gz libimobiledevice-818fcb034e5df3a3e4a5464de7eaf7b57e34cf45.tar.bz2 | |
Fixed an error in my assert statements
Diffstat (limited to 'src')
| -rw-r--r-- | src/plist.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plist.c b/src/plist.c index c86e166..e0ca653 100644 --- a/src/plist.c +++ b/src/plist.c | |||
| @@ -49,8 +49,8 @@ char* format_string(const char* buf, int cols, int depth) | |||
| 49 | int i = 0; | 49 | int i = 0; |
| 50 | int j = 0; | 50 | int j = 0; |
| 51 | 51 | ||
| 52 | assert(cols > 0); | 52 | assert(cols >= 0); |
| 53 | assert(depth > 0); | 53 | assert(depth >= 0); |
| 54 | 54 | ||
| 55 | // Inserts new lines and tabs at appropriate locations | 55 | // Inserts new lines and tabs at appropriate locations |
| 56 | for (i = 0; i < nlines; i++){ | 56 | for (i = 0; i < nlines; i++){ |
| @@ -114,7 +114,7 @@ xmlNode *add_child_to_plist(xmlDocPtr plist, const char *name, const char *conte | |||
| 114 | xmlNode *child; | 114 | xmlNode *child; |
| 115 | 115 | ||
| 116 | if (!plist) return NULL; | 116 | if (!plist) return NULL; |
| 117 | assert(depth > 0); | 117 | assert(depth >= 0); |
| 118 | if (!to_node) to_node = xmlDocGetRootElement(plist); | 118 | if (!to_node) to_node = xmlDocGetRootElement(plist); |
| 119 | 119 | ||
| 120 | for (i = 0; i < depth; i++) { | 120 | for (i = 0; i < depth; i++) { |
