From 7be853e63785276338a4c4d9e5be084f24114bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Sat, 5 Jun 2010 12:06:41 +0300 Subject: 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. --- src/del.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/del.c') 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; -- cgit v1.2.3