[hackers] [ubase] Use estrlcat where possible || FRIGN

From: <git_AT_suckless.org>
Date: Thu, 11 Feb 2016 15:36:58 +0100 (CET)

commit 4c33cf2a98312a2947c365f7cfbff29615efe2a5
Author: FRIGN <dev_AT_frign.de>
AuthorDate: Thu Feb 11 15:25:23 2016 +0100
Commit: sin <sin_AT_2f30.org>
CommitDate: Thu Feb 11 14:36:54 2016 +0000

    Use estrlcat where possible

diff --git a/mount.c b/mount.c
index 2a7773e..2eb175c 100644
--- a/mount.c
+++ b/mount.c
_AT_@ -212,8 +212,7 @@ main(int argc, char *argv[])
                 aflag = 1;
                 break;
         case 'o':
- if (strlcat(fsopts, EARGF(usage()), sizeof(fsopts)) >= sizeof(fsopts))
- eprintf("option string too long\n");
+ estrlcat(fsopts, EARGF(usage()), sizeof(fsopts));
                 parseopts(fsopts, &flags, data, sizeof(data));
                 break;
         case 't':
_AT_@ -263,8 +262,7 @@ main(int argc, char *argv[])
                                         source = me->mnt_fsname;
                                 }
                                 if (!fsopts[0])
- if (strlcat(fsopts, me->mnt_opts, sizeof(fsopts)) >= sizeof(fsopts))
- eprintf("%s: option string too long\n", target);
+ estrlcat(fsopts, me->mnt_opts, sizeof(fsopts));
                                         parseopts(fsopts, &flags, data, sizeof(data));
                                 if (!types)
                                         types = me->mnt_type;
Received on Thu Feb 11 2016 - 15:36:58 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 11 2016 - 15:48:14 CET