ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Convert-UUlib/uulib/fptools.c
(Generate patch)

Comparing Convert-UUlib/uulib/fptools.c (file contents):
Revision 1.6 by root, Mon Aug 19 23:25:36 2002 UTC vs.
Revision 1.7 by root, Thu Nov 6 13:33:41 2003 UTC

62 return TRUE; 62 return TRUE;
63} 63}
64#endif 64#endif
65#endif 65#endif
66 66
67char * fptools_id = "$Id: fptools.c,v 1.6 2002/08/19 23:25:36 root Exp $"; 67char * fptools_id = "$Id: fptools.c,v 1.7 2003/11/06 13:33:41 root Exp $";
68 68
69/* 69/*
70 * some versions of free can't handle a NULL pointer properly 70 * some versions of free can't handle a NULL pointer properly
71 * (ANSI says, free ignores a NULL pointer, but some machines 71 * (ANSI says, free ignores a NULL pointer, but some machines
72 * prefer to SIGSEGV on it) 72 * prefer to SIGSEGV on it)
390char * TOOLEXPORT 390char * TOOLEXPORT
391_FP_strrchr (char *string, int tc) 391_FP_strrchr (char *string, int tc)
392{ 392{
393 char *ptr; 393 char *ptr;
394 394
395 if (string == NULL) 395 if (string == NULL || !*string)
396 return NULL; 396 return NULL;
397 397
398 ptr = string + strlen (string) - 1; 398 ptr = string + strlen (string) - 1;
399 399
400 while (ptr != string && *ptr != tc) 400 while (ptr != string && *ptr != tc)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines