const unsigned char *c;
int length;
- if (!file) {
+ if (!file)
return NULL;
- }
length = 3 * strlen(file) + 9;
((c) >= 32 && (c) < 128 && (ACCEPTABLE_URI_CHARS[(c) - 32] & 0x08))
uri = alloca(length);
- if (uri == NULL) {
+ if (uri == NULL)
return NULL;
- }
strncpy(uri, "file://", length);
uri[length - 1] = '\0';
{
char *hash = NULL;
- if (max_length < ((2 * MD5_HASHBYTES) + 1)) {
+ if (max_length < ((2 * MD5_HASHBYTES) + 1))
return MS_MEDIA_ERR_INVALID_PARAMETER;
- }
hash = _mb_svc_generate_hash_name(origin_path);
- if (hash == NULL) {
+ if (hash == NULL)
return MS_MEDIA_ERR_INTERNAL;
- }
strncpy(hash_code, hash, max_length);
hash_code[strlen(hash_code)] = '\0';