From 89223833f138459f8f36376effbba86720ef6ed5 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Sun, 21 Nov 2010 08:11:40 -0300 Subject: [PATCH] qpkg/qpkg.c: tighten detection of inconsistent use of Filename: - qpkg/qpkg.c (find_prereq): instead of skipping nameless prerequisites, assert that these packages have a name --- qpkg/qpkg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qpkg/qpkg.c b/qpkg/qpkg.c index ee9faca..0c331dc 100644 --- a/qpkg/qpkg.c +++ b/qpkg/qpkg.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "jrb.h" #include "id.h" @@ -103,10 +104,9 @@ static void find_prereq(const char *name, const char *version) const char *file = (*pkgs)->filename; const char *end; - if (file) { - end = strchr(file, '\n'); - printf("%.*s\n", (int) (end-file), file); - } + assert(file); + end = strchr(file, '\n'); + printf("%.*s\n", (int) (end-file), file); pkgs++; } }