[Freeassociation-devel] Small fixes
Allen Winter
winter at kde.org
Tue Jun 30 03:26:48 PDT 2009
On Monday 29 June 2009 9:35:54 am Alvaro Manera wrote:
> Hi,
>
> This is the patch I am going to commit to trunk. It is so simple that I hope
> it is fine with everybody. Some really small fixes when checking for files
> and pointers.
>
Looks fine.
-Allen
> Álvaro
>
> I still have some more patches waiting to be sent to improve the quality of
> libical ;) so more comming...
>
> Index: src/libical/icalmime.c
> ===================================================================
> --- src/libical/icalmime.c (revision 932)
> +++ src/libical/icalmime.c (working copy)
> @@ -345,7 +345,8 @@
>
> } else if (parts[i].level < last_level){
>
> - parent = icalcomponent_get_parent(parent);
> + if (parent)
> + parent = icalcomponent_get_parent(parent);
> icalcomponent_add_component(parent,comp);
>
> last_level = parts[i].level;
> Index: src/libical/icalvalue.c
> ===================================================================
> --- src/libical/icalvalue.c (revision 932)
> +++ src/libical/icalvalue.c (working copy)
> @@ -709,6 +709,7 @@
> case ICAL_TEXT_VALUE:
> case ICAL_CALADDRESS_VALUE:
> case ICAL_URI_VALUE:
> + case ICAL_STRING_VALUE:
> case ICAL_QUERY_VALUE:
> {
> if (v->data.v_string != 0) {
> Index: src/libicalss/icalfileset.c
> ===================================================================
> --- src/libicalss/icalfileset.c (revision 932)
> +++ src/libicalss/icalfileset.c (working copy)
> @@ -160,7 +160,7 @@
> fileset = icalfileset_new_reader(path);
>
>
> - if (fileset == 0 && icalerrno == ICAL_FILE_ERROR) {
> + if (fileset == 0 || icalerrno == ICAL_FILE_ERROR) {
> /* file does not exist */
> ret = icalcluster_new(path, NULL);
> } else {
> Index: src/libicalvcal/icalvcal.c
> ===================================================================
> --- src/libicalvcal/icalvcal.c (revision 932)
> +++ src/libicalvcal/icalvcal.c (working copy)
> @@ -862,7 +862,7 @@
>
> /* It must be followed by whitespace or the end of the string.
> I'm not sure if anything else is allowed. */
> - if (*s != '\0' && *s != ' ' && *s != '\t') {
> + if (s && *s != '\0' && *s != ' ' && *s != '\t') {
> *error_message = "Invalid Duration";
> return NULL;
> }
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Freeassociation-devel mailing list
> Freeassociation-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freeassociation-devel
>
--
Allen Winter | allen at kdab.net | Software Engineer
KDAB (USA), LLC, a KDAB Group company
Tel. USA +1-866-777-KDAB(5322), Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions
More information about the libical-devel
mailing list