From 09ed3db89a7892a5fd9f4d168c17d8efb2105c5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 26 May 2003 01:43:14 +0000 Subject: [PATCH] Some minor style changes/clean ups. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3328 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/file_systems/bfs/Inode.h | 17 +++++++++-------- src/add-ons/kernel/file_systems/bfs/Query.cpp | 3 ++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/add-ons/kernel/file_systems/bfs/Inode.h b/src/add-ons/kernel/file_systems/bfs/Inode.h index 673733cdd6..9bd60c646b 100644 --- a/src/add-ons/kernel/file_systems/bfs/Inode.h +++ b/src/add-ons/kernel/file_systems/bfs/Inode.h @@ -255,14 +255,14 @@ class Inode : public CachedBlock { class Vnode { public: - Vnode(Volume *volume,vnode_id id) + Vnode(Volume *volume, vnode_id id) : fVolume(volume), fID(id) { } - Vnode(Volume *volume,block_run run) + Vnode(Volume *volume, block_run run) : fVolume(volume), fID(volume->ToVnode(run)) @@ -275,15 +275,15 @@ class Vnode { } status_t Get(Inode **inode) - { + { // should we check inode against NULL here? it should not be necessary - return get_vnode(fVolume->ID(),fID,(void **)inode); + return get_vnode(fVolume->ID(), fID, (void **)inode); } void Put() { if (fVolume) - put_vnode(fVolume->ID(),fID); + put_vnode(fVolume->ID(), fID); fVolume = NULL; } @@ -304,7 +304,7 @@ class AttributeIterator { ~AttributeIterator(); status_t Rewind(); - status_t GetNext(char *name,size_t *length,uint32 *type,vnode_id *id); + status_t GetNext(char *name, size_t *length, uint32 *type, vnode_id *id); private: int32 fCurrentSmallData; @@ -316,7 +316,7 @@ class AttributeIterator { friend Chain; friend Inode; - void Update(uint16 index,int8 change); + void Update(uint16 index, int8 change); AttributeIterator *fNext; }; @@ -326,7 +326,8 @@ class AttributeIterator { * file, it will be converted to R_OK. */ -inline int oModeToAccess(int omode) +inline int +oModeToAccess(int omode) { omode &= O_RWMASK; if (omode == O_RDONLY) diff --git a/src/add-ons/kernel/file_systems/bfs/Query.cpp b/src/add-ons/kernel/file_systems/bfs/Query.cpp index 3754a4deec..933e25fc8b 100644 --- a/src/add-ons/kernel/file_systems/bfs/Query.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Query.cpp @@ -1547,10 +1547,11 @@ Query::LiveUpdate(Inode *inode, const char *attribute, int32 type, const uint8 * status_t oldStatus = fExpression->Root()->Match(inode, attribute, type, oldKey, oldLength); status_t newStatus = fExpression->Root()->Match(inode, attribute, type, newKey, newLength); + int32 op; if (oldStatus == MATCH_OK && newStatus == MATCH_OK) { // only send out a notification if the name was changed - if (oldKey == NULL || strcmp(attribute,"name")) + if (oldKey == NULL || strcmp(attribute, "name")) return; send_notification(fPort, fToken, B_QUERY_UPDATE, B_ENTRY_REMOVED, fVolume->ID(), 0,