"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "utils.c" between
cryptmount-5.3.1.tar.gz and cryptmount-5.3.2.tar.gz

About: cryptmount allows any user to access encrypted filing systems on demand under GNU/Linux systems. It also assists the system administrator in creating and managing encrypted filesystems based on the kernels dm-crypt device-mapper target.

utils.c  (cryptmount-5.3.1):utils.c  (cryptmount-5.3.2)
skipping to change at line 227 skipping to change at line 227
sfxlen = strlen(file); sfxlen = strlen(file);
*buff = (char*)realloc((void*)(*buff), (pfxlen + sfxlen + 2)); *buff = (char*)realloc((void*)(*buff), (pfxlen + sfxlen + 2));
snprintf(*buff, (pfxlen + sfxlen + 2), "%s/%s", pfx, file); snprintf(*buff, (pfxlen + sfxlen + 2), "%s/%s", pfx, file);
return (int)(pfxlen + sfxlen + 1); return (int)(pfxlen + sfxlen + 1);
} }
char *cm_strdup(const char *orig) char *cm_strdup(const char *orig)
/** Make duplicate of existing string, allocating memory for copy */ /** Make duplicate of existing string, allocating memory for copy */
{ char *cpy; { char *cpy = NULL;
if (orig == NULL) return NULL; if (orig == NULL) return NULL;
cpy = (char*)malloc((size_t)(strlen(orig) + 1)); cpy = (char*)malloc(strlen(orig) + 1);
return strcpy(cpy, orig); return strcpy(cpy, orig);
} }
int cm_strcasecmp(const char *s1, const char *s2) int cm_strcasecmp(const char *s1, const char *s2)
/** Find legigraphical order of s1 & s2, ignoring case */ /** Find legigraphical order of s1 & s2, ignoring case */
{ {
if (s1 == NULL || s2 == NULL) return (s1 != NULL) - (s2 != NULL); if (s1 == NULL || s2 == NULL) return (s1 != NULL) - (s2 != NULL);
while (*s1 != '\0' && *s2 != '\0' && tolower(*s1) == tolower(*s2)) { while (*s1 != '\0' && *s2 != '\0' && tolower(*s1) == tolower(*s2)) {
++s1; ++s2; ++s1; ++s2;
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)