1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-11-22 08:24:41 +02:00

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
This commit is contained in:
Werner Almesberger 2010-11-21 08:11:40 -03:00
parent 2c953a5d1a
commit 89223833f1

View File

@ -14,6 +14,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#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++;
}
}