From: Christian Goeschel Ndjomouo Date: Thu, 1 Jan 2026 04:10:57 +0000 (-0500) Subject: style: fix coding style issues X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4137fb87a6789a65918b0d4af1fba28dfc94e957;p=thirdparty%2Futil-linux.git style: fix coding style issues Signed-off-by: Christian Goeschel Ndjomouo --- diff --git a/disk-utils/fdisk-list.c b/disk-utils/fdisk-list.c index 04ee2b431..948797f2b 100644 --- a/disk-utils/fdisk-list.c +++ b/disk-utils/fdisk-list.c @@ -327,7 +327,7 @@ int list_freespace_get_table(struct fdisk_context *cxt, } if (fdisk_partition_has_size(pa)) { - uintmax_t sz = fdisk_partition_get_size(pa);; + uintmax_t sz = fdisk_partition_get_size(pa); sumsize += sz; diff --git a/lib/mangle.c b/lib/mangle.c index 4c505bce7..e5b47aae1 100644 --- a/lib/mangle.c +++ b/lib/mangle.c @@ -106,7 +106,7 @@ size_t unescape_to_buffer(const char *s, const char *wanted, char *buf, size_t l s += 2; sz += 2; } else { - *buf++ = *s++;; + *buf++ = *s++; sz++; } } diff --git a/lib/pty-session.c b/lib/pty-session.c index e9db4988b..94633774f 100644 --- a/lib/pty-session.c +++ b/lib/pty-session.c @@ -644,7 +644,7 @@ int ul_pty_proxy_master(struct ul_pty *pty) /* note, callback usually updates @next_callback_time */ if (timerisset(&pty->next_callback_time)) { - struct timeval now = { 0 };; + struct timeval now = { 0 }; DBG(IO, ul_debugobj(pty, " callback requested")); gettime_monotonic(&now); diff --git a/libmount/src/context.c b/libmount/src/context.c index 6dfc5913d..3f1119000 100644 --- a/libmount/src/context.c +++ b/libmount/src/context.c @@ -2846,7 +2846,7 @@ int mnt_context_read_mesgs(struct libmnt_context *cxt, int fd) continue; mnt_context_append_mesg(cxt, (char *) buf); - count++;; + count++; } errno = errsv; diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c index 854b704b0..7a452ea0a 100644 --- a/libmount/src/context_umount.c +++ b/libmount/src/context_umount.c @@ -459,7 +459,7 @@ static int is_fuse_usermount(struct libmnt_context *cxt, int *errsv) struct libmnt_optlist *ol; struct libmnt_opt *opt; const char *type = mnt_fs_get_fstype(cxt->fs); - const char *val = NULL;; + const char *val = NULL; uid_t uid, entry_uid; *errsv = 0; diff --git a/libmount/src/fs.c b/libmount/src/fs.c index 6147d1f53..e6a0fa1e2 100644 --- a/libmount/src/fs.c +++ b/libmount/src/fs.c @@ -627,7 +627,7 @@ const char *mnt_fs_get_target(struct libmnt_fs *fs) #ifdef HAVE_STATMOUNT_API mnt_fs_try_statmount(fs, target, STATMOUNT_MNT_POINT); #endif - return fs->target;; + return fs->target; } /** diff --git a/libmount/src/hook_loopdev.c b/libmount/src/hook_loopdev.c index 0bb97e59b..a7cb13a08 100644 --- a/libmount/src/hook_loopdev.c +++ b/libmount/src/hook_loopdev.c @@ -458,7 +458,7 @@ static int is_loopdev_required(struct libmnt_context *cxt, struct libmnt_optlist rc = mnt_context_guess_srcpath_fstype(cxt, &autotype); if (rc) { - free(autotype);; + free(autotype); DBG(CXT, ul_debugobj(cxt, "failed to guess regfile FS type [rc=%d]", rc)); return 0; } diff --git a/libmount/src/hook_mount.c b/libmount/src/hook_mount.c index 77cf51ad3..374078c97 100644 --- a/libmount/src/hook_mount.c +++ b/libmount/src/hook_mount.c @@ -233,7 +233,7 @@ static int create_superblock(struct libmnt_context *cxt, hookset_set_syscall_status(cxt, "fsconfig", rc == 0); DBG(HOOK, ul_debugobj(hs, " create done [rc=%d]", rc)); - return rc != 0 && errno ? -errno : rc;; + return rc != 0 && errno ? -errno : rc; } static int open_fs_configuration_context(struct libmnt_context *cxt, diff --git a/libmount/src/tab_listmount.c b/libmount/src/tab_listmount.c index e4a1c2a52..b3aa40aca 100644 --- a/libmount/src/tab_listmount.c +++ b/libmount/src/tab_listmount.c @@ -126,7 +126,7 @@ static int table_init_listmount(struct libmnt_table *tb, size_t stepsiz) free(tb->lsmnt); } - tb->lsmnt = ls;; + tb->lsmnt = ls; } DBG(TAB, ul_debugobj(tb, "listmount: init [step=%zu]", ls->stepsiz)); diff --git a/libmount/src/utils.c b/libmount/src/utils.c index 49166f96f..863879718 100644 --- a/libmount/src/utils.c +++ b/libmount/src/utils.c @@ -745,7 +745,7 @@ int mnt_get_uid(const char *username, uid_t *uid) "cannot convert '%s' username to UID", username)); if (errno == 0) errno = EINVAL; - rc = -errno;; + rc = -errno; } free(buf); @@ -774,7 +774,7 @@ int mnt_get_gid(const char *groupname, gid_t *gid) "cannot convert '%s' groupname to GID", groupname)); if (errno == 0) errno = EINVAL; - rc = -errno;; + rc = -errno; } free(buf); diff --git a/libsmartcols/src/column.c b/libsmartcols/src/column.c index a3a9d9fed..a36e54690 100644 --- a/libsmartcols/src/column.c +++ b/libsmartcols/src/column.c @@ -1141,7 +1141,7 @@ int scols_column_greatest_wrap( char **data) { size_t maxsz = 0; - char *res = NULL;; + char *res = NULL; if (!scols_column_is_customwrap(cl)) return scols_column_next_wrap(cl, ce, data); diff --git a/libsmartcols/src/filter-param.c b/libsmartcols/src/filter-param.c index c989aecfc..b4700da1b 100644 --- a/libsmartcols/src/filter-param.c +++ b/libsmartcols/src/filter-param.c @@ -680,7 +680,7 @@ static int float_cast(int type, struct filter_param *n) n->val.num = fnum; break; case SCOLS_DATA_FLOAT: - break;; + break; case SCOLS_DATA_BOOLEAN: n->val.boolean = fnum > 0.0 ? true : false; break; @@ -707,7 +707,7 @@ static int bool_cast(int type, struct filter_param *n) n->val.fnum = x ? 1.0 : 0.0; break; case SCOLS_DATA_BOOLEAN: - break;; + break; default: return -EINVAL; } diff --git a/libsmartcols/src/filter.c b/libsmartcols/src/filter.c index d8068bb99..4923cd802 100644 --- a/libsmartcols/src/filter.c +++ b/libsmartcols/src/filter.c @@ -486,7 +486,7 @@ unsigned long long scols_counter_get_result(struct libscols_counter *ct) */ const char *scols_counter_get_name(struct libscols_counter *ct) { - return ct ? ct->name : NULL;; + return ct ? ct->name : NULL; } /** diff --git a/login-utils/lslogins.c b/login-utils/lslogins.c index 96d0299c6..aedc8ccc3 100644 --- a/login-utils/lslogins.c +++ b/login-utils/lslogins.c @@ -897,7 +897,7 @@ static struct lslogins_user *get_user_info(struct lslogins_control *ctl, const c if (user_wtmp) { mem2strcpy(user->last_tty, user_wtmp->ut_line, sizeof(user_wtmp->ut_line), - sizeof(user_wtmp->ut_line) + 1);; + sizeof(user_wtmp->ut_line) + 1); } else get_lastlog(ctl, user->uid, user->login, user->last_tty, LASTLOG_LINE); break; @@ -908,7 +908,7 @@ static struct lslogins_user *get_user_info(struct lslogins_control *ctl, const c if (user_wtmp) { mem2strcpy(user->last_hostname, user_wtmp->ut_host, sizeof(user_wtmp->ut_host), - sizeof(user_wtmp->ut_host) + 1);; + sizeof(user_wtmp->ut_host) + 1); } else get_lastlog(ctl, user->uid, user->login, user->last_hostname, LASTLOG_HOST); break; @@ -923,7 +923,7 @@ static struct lslogins_user *get_user_info(struct lslogins_control *ctl, const c user->failed_tty = xmalloc(sizeof(user_btmp->ut_line) + 1); mem2strcpy(user->failed_tty, user_btmp->ut_line, sizeof(user_btmp->ut_line), - sizeof(user_btmp->ut_line) + 1);; + sizeof(user_btmp->ut_line) + 1); } break; case COL_HUSH_STATUS: diff --git a/misc-utils/lsblk-properties.c b/misc-utils/lsblk-properties.c index 1f80f3e18..0a5d86c72 100644 --- a/misc-utils/lsblk-properties.c +++ b/misc-utils/lsblk-properties.c @@ -300,7 +300,7 @@ static struct lsblk_devprop *get_properties_by_blkid(struct lsblk_device *dev) if (!dev->size) goto done; if (getuid() != 0) - goto done;; /* no permissions to read from the device */ + goto done; /* no permissions to read from the device */ DBG(DEV, ul_debugobj(dev, " properties by blkid")); diff --git a/term-utils/script.c b/term-utils/script.c index 4e302347f..6a57e534a 100644 --- a/term-utils/script.c +++ b/term-utils/script.c @@ -561,7 +561,7 @@ static ssize_t __attribute__ ((__format__ (__printf__, 3, 4))) rc = vsnprintf(msg, sizeof(msg), msgfmt, ap); va_end(ap); if (rc < 0) - *msg = '\0';; + *msg = '\0'; } if (*msg) @@ -599,7 +599,7 @@ static ssize_t log_info(struct script_control *ctl, const char *name, const char rc = vsnprintf(msg, sizeof(msg), msgfmt, ap); va_end(ap); if (rc < 0) - *msg = '\0';; + *msg = '\0'; } if (*msg) diff --git a/term-utils/scriptlive.c b/term-utils/scriptlive.c index 6ac685506..f36998a99 100644 --- a/term-utils/scriptlive.c +++ b/term-utils/scriptlive.c @@ -144,7 +144,7 @@ static int mainloop_cb(void *data) /* emit previous waiting step */ if (ss->step && !replay_step_is_empty(ss->step)) { - int fd = ul_pty_get_childfd(ss->pty);; + int fd = ul_pty_get_childfd(ss->pty); rc = replay_emit_step_data(ss->setup, ss->step, fd); fdatasync(fd);