]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
minor code clean-up in access_ticket_verify2()
authorPatrick Gaubatz <patrick@gaubatz.at>
Sun, 23 Nov 2014 17:43:11 +0000 (18:43 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sun, 23 Nov 2014 18:03:27 +0000 (19:03 +0100)
src/access.c

index 1c924292836dda3a03fd38b36b44e16983cc3bcb..ac9eea5fc94ad30b2f6e7c9d9fcaec381241e478 100644 (file)
@@ -153,11 +153,11 @@ access_ticket_verify2(const char *id, const char *resource)
   if((at = access_ticket_find(id)) == NULL)
     return NULL;
 
-  char at_resource_with_webroot[256];
-  strcat(at_resource_with_webroot, tvheadend_webroot ?: "");
-  strcat(at_resource_with_webroot, at->at_resource);
+  char buf[256];
+  strcpy(buf, tvheadend_webroot ?: "");
+  strcat(buf, at->at_resource);
 
-  if(strcmp(at->at_resource, resource) && strcmp(at_resource_with_webroot, resource))
+  if(strcmp(buf, resource))
     return NULL;
 
   return access_copy(at->at_access);