projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
http://www.jwz.org/xscreensaver/xscreensaver-5.12.tar.gz
[xscreensaver]
/
hacks
/
glx
/
sonar.c
diff --git
a/hacks/glx/sonar.c
b/hacks/glx/sonar.c
index cdafdef5d0f4dd349047fcf7fae5a79c1993d257..66d8b833ff8f006070a7086102cc0a52ce3965fb 100644
(file)
--- a/
hacks/glx/sonar.c
+++ b/
hacks/glx/sonar.c
@@
-559,9
+559,11
@@
static void
copy_and_insert_bogie (sonar_sensor_data *ssd, sonar_bogie *b,
sonar_bogie **to_list)
{
copy_and_insert_bogie (sonar_sensor_data *ssd, sonar_bogie *b,
sonar_bogie **to_list)
{
- sonar_bogie *ob, *
prev
;
+ sonar_bogie *ob, *
next
;
if (!b) abort();
if (!b) abort();
- for (prev = 0, ob = *to_list; ob; prev = ob, ob = ob->next)
+ for (ob = *to_list, next = ob ? ob->next : 0;
+ ob;
+ ob = next, next = ob ? ob->next : 0)
{
if (ob == b) abort(); /* this will end badly */
if (!strcmp (ob->name, b->name)) /* match! */
{
if (ob == b) abort(); /* this will end badly */
if (!strcmp (ob->name, b->name)) /* match! */