On Mon, 2009-08-10 at 15:47 +0100, Robert Fitzsimons wrote: > I think I also got caught by this problem. Attached is a schematic > which shows the problem and a patch which seems to fix the problem > (though I've not extensively tested it). It seems to be related to the > recent new attrib API changes by Peter.
You're probably right that this is the cause - however I'm not at first glance convinced by the patch. I think your patch will fail in the case that the symbol doesn't have an inbuilt net=....:? attribute, because "return_value" will still be NULL when the code goes to check the attributes _attached_ to the object. I've attached an alternate patch - still attributed to you - since you've done the hard work if finding the bug! Please let me know if you're happy with it too, and I'll commit it. Since I don't believe this bug was caught by the gnetlist test-suite, it would be a really good idea if we could add a test which catches the problem - as well as applying the fix. I unfortunately haven't got time to add this test right now. Robert? -- Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!)
>From f8916da4834634a6ee08a7e0057ec8cb0e4c3c6e Mon Sep 17 00:00:00 2001 From: Robert Fitzsimons <[email protected]> Date: Mon, 10 Aug 2009 17:49:29 +0100 Subject: [PATCH] gnetlist: Fix problem with attached net attribute not being honored. Seems to be an artifact introduced by the change to use the new attrib API (b4996e267b5d9696f7e8122c40b31482ef852904). Signed-off-by: Robert Fitzsimons <[email protected]> Signed-off-by: Peter Clifton <[email protected]> --- gnetlist/src/s_netattrib.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gnetlist/src/s_netattrib.c b/gnetlist/src/s_netattrib.c index b813869..8c7d6c9 100644 --- a/gnetlist/src/s_netattrib.c +++ b/gnetlist/src/s_netattrib.c @@ -279,7 +279,7 @@ char *s_netattrib_net_search (OBJECT * o_current, char *wanted_pin) start_of_pinlist = char_ptr + 1; current_pin = strtok (start_of_pinlist, DELIMITERS); - while (current_pin && !return_value) { + while (current_pin) { if (strcmp (current_pin, wanted_pin) == 0) { g_free (return_value); return net_name; -- 1.6.0.4
_______________________________________________ geda-user mailing list [email protected] http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

