Skip to content

Commit 205e53d

Browse files
committed
nad: use constant pointers where appropriate
1 parent 0cc5a6c commit 205e53d

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

bin/nad/nad_cp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ static int ftw_copy_file(const struct FTW *entp _U_,
728728
size_t wresid;
729729
off_t wtotal;
730730
int ch, checkch, from_fd = 0, rcount, rval, to_fd = 0;
731-
char *bufp;
731+
const char *bufp;
732732
char *p;
733733

734734
if ((from_fd = open(spath, O_RDONLY, 0)) == -1) {

bin/nad/nad_find.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ int ad_find(int argc, char **argv, AFPObj *obj)
252252
} else {
253253
ret = 0;
254254
cnid_t cnid;
255-
char *bufp = resbuf;
255+
const char *bufp = resbuf;
256256
bstring sep = bfromcstr("/");
257257

258258
while (count--) {

bin/nad/nad_ls.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ static void print_date(const struct stat *statp)
208208
{
209209
time_t now;
210210
double diff;
211-
char buf[100], *fmt;
211+
char buf[100];
212+
const char *fmt;
212213

213214
if (time(&now) == -1) {
214215
printf(" ????????????");
@@ -231,7 +232,7 @@ static void print_flags(char *path, afpvol_t *vol, const struct stat *st)
231232
{
232233
int adflags = 0;
233234
struct adouble ad;
234-
char *FinderInfo;
235+
const char *FinderInfo;
235236
uint16_t FinderFlags;
236237
uint16_t AFPattributes;
237238
char type[5] = "----";

0 commit comments

Comments
 (0)