Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary ';' #183

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/xhyve/lock.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 /* __MAC_10_12 */
#include <os/lock.h>
#define xhyve_lock_t os_unfair_lock
#define XHYVE_LOCK_INIT(V, LOCK) (V)->LOCK = OS_UNFAIR_LOCK_INIT;
#define XHYVE_LOCK_INIT(V, LOCK) (V)->LOCK = OS_UNFAIR_LOCK_INIT
#define XHYVE_LOCK(V, LOCK) os_unfair_lock_lock(&(V)->LOCK)
#define XHYVE_UNLOCK(V, LOCK) os_unfair_lock_unlock(&(V)->LOCK)
#else
#include <libkern/OSAtomic.h>
#define xhyve_lock_t OSSpinLock
#define XHYVE_LOCK_INIT(V, LOCK) (V)->LOCK = OS_SPINLOCK_INIT;
#define XHYVE_LOCK_INIT(V, LOCK) (V)->LOCK = OS_SPINLOCK_INIT
#define XHYVE_LOCK(V, LOCK) OSSpinLockLock(&(V)->LOCK)
#define XHYVE_UNLOCK(V, LOCK) OSSpinLockUnlock(&(V)->LOCK)
#endif
2 changes: 1 addition & 1 deletion src/firmware/kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ kexec_load_ramdisk(char *path) {

zp = ((struct zero_page *) (lowmem.base + BASE_ZEROPAGE));

if (!(f = fopen(path, "r"))) {;
if (!(f = fopen(path, "r"))) {
return -1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/vmm/io/vatpit.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,9 @@ vatpit_init(struct vm *vm)
bzero(vatpit, sizeof(struct vatpit));
vatpit->vm = vm;

VATPIT_LOCK_INIT(vatpit)
VATPIT_LOCK_INIT(vatpit);

FREQ2BT(PIT_8254_FREQ, &bt);
FREQ2BT(PIT_8254_FREQ, &bt)
vatpit->freq_sbt = bttosbt(bt);

for (i = 0; i < 3; i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/vmm/io/vhpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ vhpet_init(struct vm *vm)

pthread_mutex_init(&vhpet->mtx, NULL);

FREQ2BT(HPET_FREQ, &bt);
FREQ2BT(HPET_FREQ, &bt)
vhpet->freq_sbt = bttosbt(bt);

pincount = vioapic_pincount(vm);
Expand Down
4 changes: 2 additions & 2 deletions src/vmm/io/vlapic.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ vlapic_dcr_write_handler(struct vlapic *vlapic)
* XXX changes to the frequency divider will not take effect until
* the timer is reloaded.
*/
FREQ2BT(((unsigned) (VLAPIC_BUS_FREQ / divisor)), &vlapic->timer_freq_bt);
FREQ2BT(((unsigned) (VLAPIC_BUS_FREQ / divisor)), &vlapic->timer_freq_bt)
vlapic->timer_period_bt = vlapic->timer_freq_bt;
bintime_mul(&vlapic->timer_period_bt, lapic->icr_timer);

Expand Down Expand Up @@ -312,7 +312,7 @@ vlapic_get_lvtptr(struct vlapic *vlapic, uint32_t offset)
case APIC_OFFSET_LINT1_LVT:
case APIC_OFFSET_ERROR_LVT:
i = (offset - APIC_OFFSET_TIMER_LVT) >> 2;
return ((&lapic->lvt_timer) + i);;
return ((&lapic->lvt_timer) + i);
default:
xhyve_abort("vlapic_get_lvt: invalid LVT\n");
}
Expand Down
2 changes: 1 addition & 1 deletion src/vmm/io/vpmtmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ vpmtmr_init(UNUSED struct vm *vm)
vpmtmr->baseuptime = sbinuptime();
vpmtmr->baseval = 0;

FREQ2BT(PMTMR_FREQ, &bt);
FREQ2BT(PMTMR_FREQ, &bt)
vpmtmr->freq_sbt = bttosbt(bt);

return (vpmtmr);
Expand Down
4 changes: 2 additions & 2 deletions src/vmm/vmm_callout.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static void *callout_thread_func(UNUSED void *arg) {
/* wait for work */
while (!callout_queue) {
pthread_cond_wait(&callout_cnd, &callout_mtx);
};
}

/* get the callout with the nearest timout */
c = callout_queue;
Expand All @@ -187,7 +187,7 @@ static void *callout_thread_func(UNUSED void *arg) {
delta = c->timeout - mat;
mat_to_ts(delta, &ts);
ret = pthread_cond_timedwait_relative_np(&callout_cnd, &callout_mtx, &ts);
};
}

work = false;

Expand Down