From 73a5c94e5038898f10b63b39e97af7fdb20c0f49 Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Fri, 20 Jul 2012 13:10:50 +0100 Subject: [PATCH] Add missing "%s" format string to constant error messages in lock manager Updates the lock manager code so that it passes "%s" as the format string whenever raising an error message with a const string. --- src/locking/lock_driver_sanlock.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c index 40cd518d51..477c80b4d6 100644 --- a/src/locking/lock_driver_sanlock.c +++ b/src/locking/lock_driver_sanlock.c @@ -296,7 +296,7 @@ static int virLockManagerSanlockInit(unsigned int version, goto error; if (driver->autoDiskLease && !driver->hostID) { - virLockError(VIR_ERR_INTERNAL_ERROR, + virLockError(VIR_ERR_INTERNAL_ERROR, "%s", _("Automatic disk lease mode enabled, but no host ID is set")); goto error; } @@ -338,7 +338,7 @@ static int virLockManagerSanlockNew(virLockManagerPtr lock, virCheckFlags(0, -1); if (!driver) { - virLockError(VIR_ERR_INTERNAL_ERROR, + virLockError(VIR_ERR_INTERNAL_ERROR, "%s", _("Sanlock plugin is not initialized")); return -1; } @@ -409,13 +409,13 @@ static int virLockManagerSanlockDiskLeaseName(const char *path, int i; if (strbuflen < ((MD5_DIGEST_SIZE * 2) + 1)) { - virLockError(VIR_ERR_INTERNAL_ERROR, + virLockError(VIR_ERR_INTERNAL_ERROR, "%s", _("String length too small to store md5 checksum")); return -1; } if (!(md5_buffer(path, strlen(path), buf))) { - virLockError(VIR_ERR_INTERNAL_ERROR, + virLockError(VIR_ERR_INTERNAL_ERROR, "%s", _("Unable to compute md5 checksum")); return -1; } @@ -499,7 +499,7 @@ static int virLockManagerSanlockAddDisk(virLockManagerPtr lock, char *path = NULL; if (nparams) { - virLockError(VIR_ERR_INTERNAL_ERROR, + virLockError(VIR_ERR_INTERNAL_ERROR, "%s", _("Unexpected lock parameters for disk resource")); return -1; } -- GitLab