hal/libhal-storage libhal-storage.c,1.8.2.4,1.8.2.5
David Zeuthen
david at freedesktop.org
Thu Jan 27 08:11:36 PST 2005
Update of /cvs/hal/hal/libhal-storage
In directory gabe:/tmp/cvs-serv14992/libhal-storage
Modified Files:
Tag: hal-0_4-stable-branch
libhal-storage.c
Log Message:
2005-01-27 David Zeuthen <davidz at redhat.com>
* libhal-storage/libhal-storage.c (mopts_collect): There was
a problem with trailing commas if the last option was removed.
Reported by Sebastian Dransfeld <sebastid at stud.ntnu.no>.
2005-01-26 David Zeuthen <davidz at redhat.com>
* hald/linux/net_class_device.c (link_detection_data_ready): Auch,
don't return FALSE here because that will remove the source.
Reported by Bill Moss <bmoss at clemson.edu>.
Index: libhal-storage.c
===================================================================
RCS file: /cvs/hal/hal/libhal-storage/libhal-storage.c,v
retrieving revision 1.8.2.4
retrieving revision 1.8.2.5
diff -u -d -r1.8.2.4 -r1.8.2.5
--- libhal-storage.c 25 Jan 2005 02:37:02 -0000 1.8.2.4
+++ libhal-storage.c 27 Jan 2005 16:11:34 -0000 1.8.2.5
@@ -1510,7 +1510,12 @@
end = strchr (location, ',');
if (end == NULL) {
- location[0] = '\0';
+ /* pointer arithmetic; uhh */
+ if (location > options_string) {
+ location[-1] = '\0'; /* uh, remove trailing comma */
+ } else {
+ location[0] = '\0';
+ }
} else {
strcpy (location, end + 1); /* skip the extra comma */
}
More information about the hal-commit
mailing list