Skip to contentSkip to conversation

[6727] Remove tabs introduced from VNC ACL series

Qemu-devel Anthony Liguori 1 participant 1 message Mar 6, 2009

lore
Share & tools
lore
#0 lore raw

Revision: 6727

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6727
Author:   aliguori
Date:     2009-03-06 20:27:40 +0000 (Fri, 06 Mar 2009)

Log Message:
-----------
Remove tabs introduced from VNC ACL series

Modified Paths:
--------------
trunk/acl.c
trunk/monitor.c
trunk/vnc-auth-sasl.c
trunk/vnc.c

Modified: trunk/acl.c
===================================================================

acl.c +32 -32
@@ -41,8 +41,8 @@
 {
     int i;
     for (i = 0 ; i < nacls ; i++) {
-	if (strcmp(acls[i]->aclname, aclname) == 0)
-	    return acls[i];
+        if (strcmp(acls[i]->aclname, aclname) == 0)
+            return acls[i];
     }
 
     return NULL;
@@ -54,7 +54,7 @@
 
     acl = qemu_acl_find(aclname);
     if (acl)
-	return acl;
+        return acl;
 
     acl = qemu_malloc(sizeof(*acl));
     acl->aclname = qemu_strdup(aclname);
@@ -74,19 +74,19 @@
 }
 
 int qemu_acl_party_is_allowed(qemu_acl *acl,
-			      const char *party)
+                              const char *party)
 {
     qemu_acl_entry *entry;
 
     TAILQ_FOREACH(entry, &acl->entries, next) {
 #ifdef HAVE_FNMATCH_H
-	if (fnmatch(entry->match, party, 0) == 0)
-	    return entry->deny ? 0 : 1;
+        if (fnmatch(entry->match, party, 0) == 0)
+            return entry->deny ? 0 : 1;
 #else
-	/* No fnmatch, so fallback to exact string matching
-	 * instead of allowing wildcards */
-	if (strcmp(entry->match, party) == 0)
-	    return entry->deny ? 0 : 1;
+        /* No fnmatch, so fallback to exact string matching
+         * instead of allowing wildcards */
+        if (strcmp(entry->match, party) == 0)
+            return entry->deny ? 0 : 1;
 #endif
     }
 
@@ -103,17 +103,17 @@
      * access control list */
     acl->defaultDeny = 1;
     TAILQ_FOREACH(entry, &acl->entries, next) {
-	TAILQ_REMOVE(&acl->entries, entry, next);
-	free(entry->match);
-	free(entry);
+        TAILQ_REMOVE(&acl->entries, entry, next);
+        free(entry->match);
+        free(entry);
     }
     acl->nentries = 0;
 }
 
 
 int qemu_acl_append(qemu_acl *acl,
-		    int deny,
-		    const char *match)
+                    int deny,
+                    const char *match)
 {
     qemu_acl_entry *entry;
 
@@ -129,18 +129,18 @@
 
 
 int qemu_acl_insert(qemu_acl *acl,
-		    int deny,
-		    const char *match,
-		    int index)
+                    int deny,
+                    const char *match,
+                    int index)
 {
     qemu_acl_entry *entry;
     qemu_acl_entry *tmp;
     int i = 0;
 
     if (index <= 0)
-	return -1;
+        return -1;
     if (index >= acl->nentries)
-	return qemu_acl_append(acl, deny, match);
+        return qemu_acl_append(acl, deny, match);
 
 
     entry = qemu_malloc(sizeof(*entry));
@@ -148,29 +148,29 @@
     entry->deny = deny;
 
     TAILQ_FOREACH(tmp, &acl->entries, next) {
-	i++;
-	if (i == index) {
-	    TAILQ_INSERT_BEFORE(tmp, entry, next);
-	    acl->nentries++;
-	    break;
-	}
+        i++;
+        if (i == index) {
+            TAILQ_INSERT_BEFORE(tmp, entry, next);
+            acl->nentries++;
+            break;
+        }
     }
 
     return i;
 }
 
 int qemu_acl_remove(qemu_acl *acl,
-		    const char *match)
+                    const char *match)
 {
     qemu_acl_entry *entry;
     int i = 0;
 
     TAILQ_FOREACH(entry, &acl->entries, next) {
-	i++;
-	if (strcmp(entry->match, match) == 0) {
-	    TAILQ_REMOVE(&acl->entries, entry, next);
-	    return i;
-	}
+        i++;
+        if (strcmp(entry->match, match) == 0) {
+            TAILQ_REMOVE(&acl->entries, entry, next);
+            return i;
+        }
     }
     return -1;
 }

Modified: trunk/monitor.c
===================================================================

monitor.c +81 -81

220 lines not on this page · raw message

Modified: trunk/vnc-auth-sasl.c
===================================================================

vnc-auth-sasl.c +235 -235

687 lines not on this page · raw message

Modified: trunk/vnc.c
===================================================================

vnc.c +363 -363

1,103 lines not on this page · raw message