mount.c (9a7cd2e6b17c2df762575f14e8d6a0f835d17741) | mount.c (e96092e82bbfbee2350ed4061ae1db9b95ef7156) |
---|---|
1/*- 2 * Copyright (c) 1980, 1989, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 527 unchanged lines hidden (view full) --- 536 return (found); 537} 538 539static void 540append_arg(struct cpa *sa, char *arg) 541{ 542 if (sa->c + 1 == sa->sz) { 543 sa->sz = sa->sz == 0 ? 8 : sa->sz * 2; | 1/*- 2 * Copyright (c) 1980, 1989, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 527 unchanged lines hidden (view full) --- 536 return (found); 537} 538 539static void 540append_arg(struct cpa *sa, char *arg) 541{ 542 if (sa->c + 1 == sa->sz) { 543 sa->sz = sa->sz == 0 ? 8 : sa->sz * 2; |
544 sa->a = realloc(sa->a, sizeof(sa->a) * sa->sz); | 544 sa->a = realloc(sa->a, sizeof(*sa->a) * sa->sz); |
545 if (sa->a == NULL) 546 errx(1, "realloc failed"); 547 } 548 sa->a[++sa->c] = arg; 549} 550 551int 552mountfs(const char *vfstype, const char *spec, const char *name, int flags, --- 413 unchanged lines hidden --- | 545 if (sa->a == NULL) 546 errx(1, "realloc failed"); 547 } 548 sa->a[++sa->c] = arg; 549} 550 551int 552mountfs(const char *vfstype, const char *spec, const char *name, int flags, --- 413 unchanged lines hidden --- |