From: Volker Lendecke Date: Mon, 20 Oct 2025 15:42:40 +0000 (+0200) Subject: lib: Fix trailing whitespace X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bad81deaa6602e6dc1fda1147f87ec43cc2f207a;p=thirdparty%2Fsamba.git lib: Fix trailing whitespace Signed-off-by: Volker Lendecke Reviewed-by: Anoop C S --- diff --git a/source3/lib/sysquotas.c b/source3/lib/sysquotas.c index a984ec559c2..bdf88bf3ff0 100644 --- a/source3/lib/sysquotas.c +++ b/source3/lib/sysquotas.c @@ -1,18 +1,18 @@ -/* +/* Unix SMB/CIFS implementation. System QUOTA function wrappers Copyright (C) Stefan (metze) Metzmacher 2003 - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -27,7 +27,7 @@ #ifdef HAVE_SYS_QUOTAS -#if defined(HAVE_QUOTACTL_4A) +#if defined(HAVE_QUOTACTL_4A) /*#endif HAVE_QUOTACTL_4A */ #elif defined(HAVE_QUOTACTL_4B) @@ -117,7 +117,7 @@ static int sys_path_to_bdev(const char *path, char **mntpath, char **bdev, char if (fp == NULL) { goto out; } - + while ((mnt = getmntent(fp))) { if (!strequal(mnt->mnt_dir, stat_mntpath)) { continue; @@ -165,15 +165,15 @@ static int sys_path_to_bdev(const char *path, char **mntpath, char **bdev, char (*mntpath) = NULL; (*bdev) = NULL; (*fs) = NULL; - + /* find the block device file */ if ((ret=sys_stat(path, &S, false))!=0) { return ret; } - + if ((ret=devnm(S_IFBLK, S.st_ex_dev, dev_disk, 256, 1))!=0) { - return ret; + return ret; } /* we should get the mntpath right... @@ -188,10 +188,10 @@ static int sys_path_to_bdev(const char *path, char **mntpath, char **bdev, char SAFE_FREE(*mntpath); SAFE_FREE(*bdev); ret = -1; - } - - - return ret; + } + + + return ret; } /* #endif HAVE_DEVNM */ @@ -207,7 +207,7 @@ static int sys_path_to_bdev(const char *path, char **mntpath, char **bdev, char (*mntpath) = NULL; (*bdev) = NULL; (*fs) = NULL; - + (*mntpath) = SMB_STRDUP(path); if (*mntpath) { ret = 0; @@ -364,7 +364,7 @@ static int command_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t if (p && *p) { dp->ihardlimit = STR_TO_SMB_BIG_UINT(p, &p); } else { - goto invalid_param; + goto invalid_param; } while (p && *p && isspace(*p)) { @@ -382,7 +382,7 @@ static int command_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t DEBUG (3, ("Parsed output of get_quota, ...\n")); - DEBUGADD (5,( + DEBUGADD (5,( "qflags:%"PRIu32" curblocks:%"PRIu64" softlimit:%"PRIu64" hardlimit:%"PRIu64"\n" "curinodes:%"PRIu64" isoftlimit:%"PRIu64" ihardlimit:%"PRIu64" bsize:%"PRIu64"\n", dp->qflags,dp->curblocks, @@ -498,7 +498,7 @@ int sys_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI if (!path||!dp) smb_panic("sys_get_quota: called with NULL pointer"); - if (command_get_quota(path, qtype, id, dp)==0) { + if (command_get_quota(path, qtype, id, dp)==0) { return 0; } else if (errno != ENOSYS) { return -1; @@ -523,8 +523,8 @@ int sys_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI fs,mntpath,bdev,qtype,(qtype==SMB_GROUP_QUOTA_TYPE?id.gid:id.uid))); } ready = True; - break; - } + break; + } } if (!ready) { @@ -560,7 +560,7 @@ int sys_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI if (!path||!dp) smb_panic("get_smb_quota: called with NULL pointer"); - if (command_set_quota(path, qtype, id, dp)==0) { + if (command_set_quota(path, qtype, id, dp)==0) { return 0; } else if (errno != ENOSYS) { return -1; @@ -572,7 +572,7 @@ int sys_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI } errno = 0; - DEBUG(10,("sys_set_quota() uid(%u, %u)\n", (unsigned)getuid(), (unsigned)geteuid())); + DEBUG(10,("sys_set_quota() uid(%u, %u)\n", (unsigned)getuid(), (unsigned)geteuid())); for (i=0;(fs && sys_quota_backends[i].name && sys_quota_backends[i].set_quota);i++) { if (strcmp(fs,sys_quota_backends[i].name)==0) { @@ -586,7 +586,7 @@ int sys_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI } ready = True; break; - } + } } if (!ready) { @@ -605,7 +605,7 @@ int sys_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI SAFE_FREE(bdev); SAFE_FREE(fs); - return ret; + return ret; } #else /* HAVE_SYS_QUOTAS */ @@ -616,4 +616,3 @@ int sys_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI return; } #endif /* HAVE_SYS_QUOTAS */ - diff --git a/source3/lib/sysquotas_4A.c b/source3/lib/sysquotas_4A.c index 674c4ee02db..5e36b501ac6 100644 --- a/source3/lib/sysquotas_4A.c +++ b/source3/lib/sysquotas_4A.c @@ -1,18 +1,18 @@ -/* +/* Unix SMB/CIFS implementation. System QUOTA function wrappers for QUOTACTL_4A Copyright (C) Stefan (metze) Metzmacher 2003 - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -211,7 +211,7 @@ int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt * didn't work! * So we just return 0 * --metze - * + * * On HPUX we didn't have the mount path, * we need to fix sys_path_to_bdev() * @@ -226,25 +226,25 @@ int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt if ((qflags"AS_DENY_DISK)||(qflags"AS_ENABLED)) { if (ret == 0) { char *quota_file = NULL; - + asprintf("a_file,"/%s/%s%s",path, QUOTAFILENAME,USERQUOTAFILE_EXTENSION); if (quota_file == NULL) { DEBUG(0,("asprintf() failed!\n")); errno = ENOMEM; return -1; } - + ret = quotactl(QCMD(Q_QUOTAON,USRQUOTA), (caddr_t)bdev, -1,(void *)quota_file); } else { - ret = 0; + ret = 0; } } else { if (ret != 0) { /* turn off */ - ret = quotactl(QCMD(Q_QUOTAOFF,USRQUOTA), (caddr_t)bdev, -1, (void *)0); + ret = quotactl(QCMD(Q_QUOTAOFF,USRQUOTA), (caddr_t)bdev, -1, (void *)0); } else { ret = 0; - } + } } DEBUG(0,("sys_set_vfs_quota: ret(%d) errno(%d)[%s] uid(%d) bdev[%s]\n", @@ -268,7 +268,7 @@ int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt * didn't work! * So we just return 0 * --metze - * + * * On HPUX we didn't have the mount path, * we need to fix sys_path_to_bdev() * @@ -283,25 +283,25 @@ int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt if ((qflags"AS_DENY_DISK)||(qflags"AS_ENABLED)) { if (ret == 0) { char *quota_file = NULL; - + asprintf("a_file,"/%s/%s%s",path, QUOTAFILENAME,GROUPQUOTAFILE_EXTENSION); if (quota_file == NULL) { DEBUG(0,("asprintf() failed!\n")); errno = ENOMEM; return -1; } - + ret = quotactl(QCMD(Q_QUOTAON,GRPQUOTA), (caddr_t)bdev, -1,(void *)quota_file); } else { - ret = 0; + ret = 0; } } else { if (ret != 0) { /* turn off */ - ret = quotactl(QCMD(Q_QUOTAOFF,GRPQUOTA), (caddr_t)bdev, -1, (void *)0); + ret = quotactl(QCMD(Q_QUOTAOFF,GRPQUOTA), (caddr_t)bdev, -1, (void *)0); } else { ret = 0; - } + } } DEBUG(0,("sys_set_vfs_quota: ret(%d) errno(%d)[%s] uid(%d) bdev[%s]\n", diff --git a/source3/lib/sysquotas_linux.c b/source3/lib/sysquotas_linux.c index 4415f519ce0..97dfa50bc12 100644 --- a/source3/lib/sysquotas_linux.c +++ b/source3/lib/sysquotas_linux.c @@ -1,18 +1,18 @@ -/* +/* Unix SMB/CIFS implementation. System QUOTA function wrappers for LINUX Copyright (C) Stefan (metze) Metzmacher 2003 - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ diff --git a/source3/lib/sysquotas_nfs.c b/source3/lib/sysquotas_nfs.c index 14dcb028d0a..95864b53c1c 100644 --- a/source3/lib/sysquotas_nfs.c +++ b/source3/lib/sysquotas_nfs.c @@ -1,18 +1,18 @@ -/* +/* Unix SMB/CIFS implementation. System QUOTA function wrappers for NFS Copyright (C) Michael Adam 2010 - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ diff --git a/source3/lib/sysquotas_xfs.c b/source3/lib/sysquotas_xfs.c index 6b184874435..fa45ad7eaf3 100644 --- a/source3/lib/sysquotas_xfs.c +++ b/source3/lib/sysquotas_xfs.c @@ -1,18 +1,18 @@ -/* +/* Unix SMB/CIFS implementation. System QUOTA function wrappers for XFS Copyright (C) Stefan (metze) Metzmacher 2003 - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -26,7 +26,7 @@ #if defined(HAVE_SYS_QUOTAS) && defined(HAVE_XFS_QUOTAS) #ifdef HAVE_SYS_QUOTA_H -#include +#include #endif /* this one should actually come from glibc: */ @@ -49,7 +49,7 @@ #define Q_XGETQSTAT Q_GETQSTAT #endif /* Q_XGETQSTAT */ -/* currently doesn't support Group and Project quotas on IRIX +/* currently doesn't support Group and Project quotas on IRIX */ #ifndef QCMD @@ -81,10 +81,10 @@ int sys_get_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt if (!bdev||!dp) smb_panic("sys_get_xfs_quota: called with NULL pointer"); - + ZERO_STRUCT(*dp); dp->qtype = qtype; - + switch (qtype) { case SMB_USER_QUOTA_TYPE: DEBUG(10,("sys_get_xfs_quota: path[%s] bdev[%s] SMB_USER_QUOTA_TYPE uid[%u]\n", @@ -184,7 +184,7 @@ int sys_set_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt if (!bdev||!dp) smb_panic("sys_set_xfs_quota: called with NULL pointer"); - + if (bsize == dp->bsize) { D.d_blk_softlimit = dp->softlimit; D.d_blk_hardlimit = dp->hardlimit; @@ -219,13 +219,13 @@ int sys_set_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt path, bdev, (unsigned)id.uid)); quotactl(QCMD(Q_XGETQSTAT,USRQUOTA), bdev, -1, (caddr_t)&F); - + if (qflags & QUOTAS_DENY_DISK) { if (!(F.qs_flags & XFS_QUOTA_UDQ_ENFD)) q_on |= XFS_QUOTA_UDQ_ENFD; if (!(F.qs_flags & XFS_QUOTA_UDQ_ACCT)) q_on |= XFS_QUOTA_UDQ_ACCT; - + if (q_on != 0) { ret = quotactl(QCMD(Q_XQUOTAON,USRQUOTA),bdev, -1, (caddr_t)&q_on); } else { @@ -277,13 +277,13 @@ int sys_set_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt path, bdev, (unsigned)id.gid)); quotactl(QCMD(Q_XGETQSTAT,GRPQUOTA), bdev, -1, (caddr_t)&F); - + if (qflags & QUOTAS_DENY_DISK) { if (!(F.qs_flags & XFS_QUOTA_GDQ_ENFD)) q_on |= XFS_QUOTA_GDQ_ENFD; if (!(F.qs_flags & XFS_QUOTA_GDQ_ACCT)) q_on |= XFS_QUOTA_GDQ_ACCT; - + if (q_on != 0) { ret = quotactl(QCMD(Q_XQUOTAON,GRPQUOTA),bdev, -1, (caddr_t)&q_on); } else {