path: root/src/del.c
diff options
authorTimo Teräs <>2010-06-05 12:06:41 +0300
committerTimo Teräs <>2010-06-05 12:33:54 +0300
commit7be853e63785276338a4c4d9e5be084f24114bed (patch)
tree3481293203a948897d7a10f9fb74f09a7c7d6286 /src/del.c
parent069c89898478b0273f7e6d0ea803d6151ee74ff7 (diff)
all: rework how arrays work
Instead of having a null pointer, use a dummy array which just says the array is empty. This helps in multiple places of the code which would otherwise need explicitly need to check first if the array exists. This has been cause of multiple seg.faults in the past as the array check is easily omitted. This also removes (or fixes) all existing checks accordingly.
Diffstat (limited to 'src/del.c')
1 files changed, 0 insertions, 3 deletions
diff --git a/src/del.c b/src/del.c
index c88bc81..7ac7625 100644
--- a/src/del.c
+++ b/src/del.c
@@ -33,9 +33,6 @@ static int del_main(void *ctx, struct apk_database *db, int argc, char **argv)
struct apk_name *name;
int i, r = 0;
- if (db->world == NULL)
- return 0;
for (i = 0; i < argc; i++) {
name = apk_db_get_name(db, APK_BLOB_STR(argv[i]));
name->flags &= ~APK_NAME_TOPLEVEL;