diff options
author | 7 <jpr@helixcode.com> | 2000-10-27 23:52:58 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2000-10-27 23:52:58 +0800 |
commit | d47425dac39e16390bc9c5908efc300b011a88ea (patch) | |
tree | aab31ba8dffd02be58448ce0cc011817834bcf05 /e-util/e-pilot-map.c | |
parent | 0ba64cd2e77c0fe126f38031d4288573d9855e7e (diff) | |
download | gsoc2013-evolution-d47425dac39e16390bc9c5908efc300b011a88ea.tar.gz gsoc2013-evolution-d47425dac39e16390bc9c5908efc300b011a88ea.tar.zst gsoc2013-evolution-d47425dac39e16390bc9c5908efc300b011a88ea.zip |
Return null if no pnode was found.
2000-10-27 <jpr@helixcode.com>
* e-pilot-map.c (e_pilot_map_lookup_uid): Return null if no
pnode was found.
svn path=/trunk/; revision=6229
Diffstat (limited to 'e-util/e-pilot-map.c')
-rw-r--r-- | e-util/e-pilot-map.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/e-util/e-pilot-map.c b/e-util/e-pilot-map.c index 583e0ad2ec..4f985ccace 100644 --- a/e-util/e-pilot-map.c +++ b/e-util/e-pilot-map.c @@ -165,7 +165,7 @@ e_pilot_map_insert (EPilotMap *map, guint32 pid, const char *uid, gboolean archi guint32 e_pilot_map_lookup_pid (EPilotMap *map, const char *uid) { - EPilotMapUidNode *unode; + EPilotMapUidNode *unode = NULL; unode = g_hash_table_lookup (map->uid_map, uid); @@ -178,10 +178,13 @@ e_pilot_map_lookup_pid (EPilotMap *map, const char *uid) const char * e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid) { - EPilotMapPidNode *pnode; + EPilotMapPidNode *pnode = NULL; pnode = g_hash_table_lookup (map->pid_map, &pid); + if (pnode == NULL) + return NULL; + return pnode->uid; } |