summaryrefslogtreecommitdiffstats
path: root/doc/developer-guide/coding-standard.md
Commit message (Collapse)AuthorAgeFilesLines
* Fixing formatting errors in markdown fileskshithijiyer2019-06-081-14/+14
| | | | | | | | | | There are a lot of fromatting error is markdown files peresent under /doc directiory of the project. Fixing formatting errors and sending a patch. Fixes: bz#1718273 Change-Id: I08f938088bbaaafddf634f73616ea0dbfe7aedf3 Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
* coding-standard: memset before string functions similar to sprintf/snprintf etcSusant Palai2018-11-261-0/+31
| | | | | | | | | | | | | String functions like sprintf/snprintf/vprintf etc terminates the string with a null character. This makes meset redundant and also incurs some performance penalty. Also added a comment about using GF_MALLOC instead of GF_CALLOC for allocating buffer for strings, targeted by such functions. Fixes: bz#1193929 Change-Id: I4f40d4fd5342b70983936119606c6c9f352c303c Signed-off-by: Susant Palai <spalai@redhat.com>
* clang-format: add the config fileAmar Tumballi2018-09-121-0/+24
| | | | | | | | Also update the required documents and scripts to enable clang-format Change-Id: I73aae6db06c2f732a1779d59a73bc05e28beafba updates: bz#1564149 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* glusterd: fix gcc7 warningsAmar Tumballi2018-08-141-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | [sh]$ gcc --version gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) Warnings were of the type below: xlators/mgmt/glusterd/src/glusterd-store.c:3285:33: warning: ‘/options’ directive output may be truncated writing 8 bytes into a region of size between 1 and 4096 [-Wformat-truncation=] snprintf (path, len, "%s/options", conf->workdir); ^~~~~~~~ xlators/mgmt/glusterd/src/glusterd-store.c:1280:39: warning: ‘/snaps/’ directive output may be truncated writing 7 bytes into a region of size between 1 and 4096 [-Wformat-truncation=] snprintf (snap_fpath, len, "%s/snaps/%s/%s", priv->workdir, ^~~~~~~ * Also changed some places where there was issues with key size * Made sure all the 'char buf[SOMESIZE] = {0,};' are changed to 'char buf[SOMESIZE] = "";` - In the files I changed * Also edited coding standard to reflect that. updates: bz#1193929 Change-Id: I04c652624ac63199cea2077e46b3a5def37c3689 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* coding-standard: add points on structure paddingAmar Tumballi2018-08-021-0/+48
| | | | | | | | This is a recommendation for users, and reviewers can take a point from this. Updates: bz#1193929 Change-Id: Idcd778e42a886fd79b549da4927149a07573a20b Signed-off-by: Amar Tumballi <amarts@redhat.com>
* project: update coding standardJeff Darcy2017-10-161-75/+245
| | | | | Change-Id: I1d389c8d97ec1491be675bea2ff90898f1209861 Signed-off-by: Jeff Darcy <jdarcy@fb.com>
* doc: restructure developer docs to new layoutHumble Devassy Chirammal2015-03-301-0/+402
The developer oriented information is scattered in source and its very difficult to identify which are those. With this patch subdirs are created under developer-guide which will be the parent for developer notes. The changes suggested in http://review.gluster.org/#/c/8827/ are also included in this patch. Change-Id: I4c8510d52c49f4066225f72cac8f97f087d6c70c BUG: 1206539 Signed-off-by: Humble Devassy Chirammal <hchiramm@redhat.com> Reviewed-on: http://review.gluster.org/10038 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>